Check for missing config after #ProjectServer 2007/2010 PWA instance merge #PS2010 #PS2007 #MSProject

I recently worked on a Project to migrate two Project Server 2003 instances into one Project Server 2010 instance. We achieved this by migrating both Project Server 2003 instances to two separate Project Server 2007 instances then merged the smaller of the two instances into the other instance in 2007. Luckily we only needed to migrate the configuration from 2003 in 2010. For this we took a playbooks export of the global configuration from the smaller instance and imported this into the other PWA instance using the merge option. On the whole this approach worked quite well, with only a few errors on importing a couple of custom fields and views. There were some items that we needed to migrate manually (Resource Pool, Enterprise Global etc.).

Now that we had the two environments merged into one 2007 PWA instance we wanted to confirm that we had all of the entities from both systems in the one PWA instance that we were going to take forward to Project Server 2010. To do this I used a simple SQL query that runs against the Published database. Please note, it is not officially supported to query the published database directly with T-SQL so please do so at your own risk. I have used the no lock hint to avoid any tables locks and this was not run on a live production environment. The query used is below:

–SOURCEDB_Published is the PWA instance where the export was taken from

–TARGETDB_Published is the PWA instance where the exported config was imported and merged

–custom fields

use SOURCEDB_Published


from dbo.MSP_CUSTOM_FIELDS CF with (nolock)

where CF.MD_Prop_Name not in (select CFT.MD_PROP_NAME from TARGETDB_Published.dbo.MSP_CUSTOM_FIELDS CFT with (nolock))

–lookup tables

use SOURCEDB_Published

select LT.LT_NAME

from dbo.MSP_LOOKUP_TABLES LT with (nolock)

where LT.LT_NAME not in (select LTT.LT_NAME from TARGETDB_Published.dbo.MSP_LOOKUP_TABLES LTT with (nolock))

–lookup table values (text values)

use SOURCEDB_Published

select LV.LT_VALUE_FULL, LT.LT_name AS [Lookup Table Name]

from dbo.MSP_LOOKUP_TABLE_VALUES LV with (nolock)

Inner Join dbo.MSP_LOOKUP_TABLES LT with (nolock)


where LV.LT_VALUE_TEXT not in

(select Cast(LVT.LT_VALUE_FULL as nvarchar(max))

from TARGETDB_Published.dbo.MSP_LOOKUP_TABLE_VALUES LVT with (nolock)

Inner Join TARGETDB_Published.dbo.MSP_LOOKUP_TABLES LTT with (nolock)



use SOURCEDB_Published

select C.CAL_NAME

from dbo.MSP_CALENDARS C with (nolock)

where C.CAL_NAME not in (Select CT.CAL_NAME from TARGETDB_Published.dbo.MSP_CALENDARS CT with (nolock) where CT.Cal_is_base_Cal = 1)

–views (PWA)

use SOURCEDB_Published


from dbo.MSP_WEB_VIEW_REPORTS V with (nolock)

where V.WVIEW_NAME not in (Select VT.WVIEW_NAME from TARGETDB_Published.dbo.MSP_WEB_VIEW_REPORTS VT with (nolock))

–security categories

use SOURCEDB_Published


from dbo.MSP_WEB_SECURITY_CATEGORIES CAT with (nolock)

where CAT.WSEC_CAT_NAME not in (Select CAT.WSEC_CAT_NAME from TARGETDB_Published.dbo.MSP_WEB_SECURITY_CATEGORIES CAT with (nolock))

–security groups

use SOURCEDB_Published


from dbo.MSP_WEB_SECURITY_GROUPS G with (nolock)

where G.WSEC_GRP_NAME not in (Select GT.WSEC_GRP_NAME from TARGETDB_Published.dbo.MSP_WEB_SECURITY_GROUPS GT with (nolock))

Hopefully that will help you validate certain entities in the PWA instance when merging two instances into one.


Comments are closed.

Blog at

Up ↑

%d bloggers like this: