#ProjectServer 2010 environment rollover steps #PowerShell #PS2010 #MSProject #SP2010

April 10, 2012 at 6:56 pm | Posted in Administration, Functionality, Migration, PowerShell | 2 Comments
Tags: , ,

This blog post will detail the PowerShell commands required to carry out an environment rollover using Windows PowerShell where possible. The steps below use the 5 database approach to rollover over the Production environment to the Test / Development environment.

For more details on the Project Server database restore please see Andrew’s blog posts found below:

http://azlav.umtblog.com/2011/06/07/project-server-2010-database-restore-part-i/

http://azlav.umtblog.com/2011/06/09/project-server-2010-database-restore-part-ii/

As a prerequisite I would recommend taking full backups of the Test / Dev farm to enable the environment to be rolled back if required. Use your usual farm backup procedures.

Test / Dev environment Prep

Firstly connect to the Test / Dev Application server and launch the SharePoint 2010 Management shell. If you are not familiar with the management shell it can be found in the Microsoft SharePoint 2010 Products folder – Start | All Programs | Microsoft SharePoint 2010 Products | SharePoint 2010 Management Shell.

Type the following:

Remove-SPProjectWebInstance –Url <URL of Test / Dev PWA site that you want to refresh with the Production data and config>

Example:

clip_image002

Press Enter and the command will remove the existing Test / Dev instance

clip_image002[6]

You can check in Central admin in the Project Server Service Application to check that the PWA site has been removed:

clip_image002[8]

Using the SharePoint 2010 Management Shell detach the existing content database from the web application that hosted the PWA site collection that was removed in the previous step.

Type the following:

Dismount-SPContentDatabase “<Database name here>”

Example:

clip_image002[10]

Press Enter:

clip_image004

Press Y to confirm and Press Enter.

Test / Dev environment SQL Prep

Take a backup of the 5 databases from the Production environment and copy these over to the Test / Dev SQL server and restore the databases. The databases required are:

  • Content database that contains the PWA site and Project Sites
  • ProjectServer_Archive
  • ProjectServer_Draft
  • ProjectServer_Published
  • ProjectServer_Reporting

Make a note of the database names used when these databases are restored as they will be required later.

Test / Dev environment configuration

Using the SharePoint Management Shell, attach the restored content database to the web application that will host the PWA site collection.

Type the following:

Mount-SPContentDatabase “<content database name restored in previous step>” -DatabaseServer “<Test / DEV SQL Server>” –WebApplication <web application URL>

Example:

clip_image002[12]

Press Enter:

clip_image002[14]

Now using the SharePoint 2010 Management Shell provision the PWA site collection in the web application where the database was just attached to and using the 4 Project Server databases that were restored previously. Please note, use the same PWA path name used in Production. For example if the instance is called /PWA in Production, use /PWA in the command below on the Test / Dev environment.

Type the following command:

New-SPProjectWebInstance -Url “<web application URL + PWA path>” -AdminAccount “<Project Server Administrator account> -PrimaryDbserver “<Test / Dev SQL Server>” -PublishedDbname “<ProjectServer Published database>” -ArchiveDbname “<ProjectServer Archive database>” -DraftDbname “<ProjectServer Draft database>” -ReportingDbserver “<Test / Dev Reporting SQL Server>” -ReportingDbname “<ProjectServer Reporting database>”

Example:

clip_image002[16]

Press Enter:

clip_image004[8]

You can check the provisioning status of the PWA site using PowerShell or in Central admin in the Project Server Service Application to check that the PWA site has been created:

Type the following:

Get-SPProjectWebInstance –URL <PWA URL> | Select ProvisioningStatus

Example:

image

Or in Central Admin:

clip_image002[18]

Post Provisioning

The Project Sites will need to be relinked using the “Bulk Update Project Sites” functionality in Server Settings on the newly provisioned Test / Dev PWA site.

The Project Server timer jobs (Resource capacity, Daily Scheduled backup and Cube build – also update the SQL AS server / cube name) will need to have the scheduled times modified on the Test / Dev system so that the Timer Jobs are recreated / relinked in Central Admin on the Test / Dev environment.

The Excel services reports will need to be updated to use the ODC files from the Test / Dev environment as they will currently point to the Production ODC files. This is done by opening the Excel reports in Excel, changing the ODC file then saving the file back to the library.

Advertisements

2 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Thanks for the post, its really helpful, I am going to try it.

  2. Fantastic article post.Much thanks again. Much obliged….


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: