Run Migration Script 3 to capture a Project Server 2003 data snapshot

 

Applies to: Project Server 2010

Topic Last Modified: 2011-04-18

Migration Script 3 is one of several migration scripts included in the Microsoft Office Project Server 2003 virtual migration environment (VME) to assist in migrating your Microsoft Office Project Server 2003 data. Run Script 3 to take a data snapshot of the Project Server 2003 database that you plan to migrate. The script takes a data snapshot of the Projects and Tasks tables and then stores the information in a table created dynamically within the script. The stored results from this script can be compared later to a post-migration data snapshot to verify whether all data has migrated successfully.

Warning

This script is one of several pre-migration scripts included in the Microsoft Office Project Server 2003 virtual migration environment (VME). Running the scripts is optional, but highly recommended for helping to detect issues that may prevent a successful migration of your data. For more information about the pre-migration scripts that are available, see Project Server VME: Run pre-migration scripts (optional).

Important

This script requires a blank database to which results are saved. Prior to running this script, have your SQL Server database administrator create a blank database named “ProjectServer_Migration_Data_Validation”. Verify that the database is named correctly to ensure that the script will be able to use it.

To run Script 3

  1. On the VME desktop, click Start Migration Process. This opens a Windows Explorer window that displays the contents of drive E.

  2. In Windows Explorer, double-click the following folder:

    • If you have one Project Server 2003 database, open the Migrate_Proj_2003_Single_DB folder.

    • If you have split Project Server 2003 databases, open Migrate_Proj_2003_Split_DB.

  3. Open the Verification Scripts folder, and then click VME Script 3.sql. This opens Microsoft Office Project Server 2003 and displays Script 3.

  4. Click Execute to run the script.

  5. The results from the script are saved to the ProjectServer_Migration_Data_Validation database in the table named dbo.Migration_PS2003_Data_Validation_Snapshot.

Script 3

Script 3 contains the following code:

/*---------------------------------------------------------------------------------------
-- Script A3: Capture Data Validation Snapshot for Project Server 2003 ---- Updated Jan 12, 2010
-- This script:
-- 1. drops the PS2003 Validation Snapshot table if it exists from the Migration Validation 
      Database previously created
   2. Reads the Project Server 2003 SP2a database to extract Projects and Tasks information
   3. Stores the output dataset into a new table created in the Migration Validation 
      Database
   This script requires to set the database names of the Migration Validation Database and the 
   Project Server 2003 database in the USE statements 
 ----------------------------------------------------------------------------------------------*/
USE ProjectServer_Migration_Data_Validation
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'MIgration_PS2003_Data_Validation_Snapshot')
AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
DROP TABLE dbo.Migration_PS2003_Data_Validation_Snapshot
GO
USE [Project2003SourceDB]
GO
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
GO
SELECT p11p.proj_name as N'Project Name',
        p11p.proj_id as 'Project ID',
        p11p.proj_version as N'Project Version',
        p11p.proj_info_start_date as N'Proj Start Date',
        p11p.proj_info_finish_date as N'Proj Finish Date',
        p11p.proj_info_status_date as N'Proj Status Date',
        p11p.proj_info_cal_name as N'Proj Calendar Name',
        p11p.proj_type as N'Proj Type',   
        p11t.task_name as N'Task Name',
        p11t.task_uid as N'Task UID',
        p11t.task_type as N'Task Type',
        p11t.task_start_date as N'Task Start Date',
        p11t.task_finish_date as N'Task Finish Date',
        p11t.task_act_start as N'Task Act Start',
        p11t.task_act_finish as N'Task Act Finish',
        p11t.task_constraint_date as N'Task Constraint Date',
        p11t.task_deadline as N'Task Deadline',
        p11t.task_work as N'Task Work',
        p11t.task_act_work as N'Task Actual Work',
        p11t.task_rem_work as N'Task Rem Work',
        p11t.task_ovt_work as N'Task Ovt Work',
        p11t.task_act_ovt_work as N'Task Actual Ovt Work',
        p11t.task_rem_ovt_work as N'Task Rem Ovt Work',
        p11t.task_pct_comp as N'Task %Complete',
        p11t.task_pct_work_comp as N'Task %Work Complete',
        p11t.task_phy_pct_comp as N'Task % Phys Work Complete',
        p11t.task_dur as N'Task Duration',
        p11t.task_rem_dur as N'Task Rem Duration',
        p11t.task_act_dur as N'Task Actual Duration',
        p11t.task_is_milestone as N'Task Milestone',
        p11t.task_cost as N'Task Cost',
        p11t.task_fixed_cost as N'Task Fixed Cost',
        p11t.task_act_cost as N'Task Actual Cost',
        p11t.task_rem_cost as N'Task Rem Cost',
        p11t.task_ovt_cost as N'Task Ovt Cost',
        p11t.task_act_ovt_cost as N'Task Actual Ovt Cost',
        p11t.task_rem_ovt_cost as N'Task Rem Ovt Cost'
INTO ProjectServer_Migration_Data_Validation.dbo.Migration_PS2003_Data_Validation_Snapshot

FROM msp_projects AS p11p,
msp_tasks AS p11t
WHERE (p11p.proj_id = p11t.proj_id)
  
ORDER BY 1,5