Share via


Capture a Project Server 2003 data snapshot before migration

 

Applies to: Project Server 2010

Topic Last Modified: 2010-09-27

In this step, run Script 3 to take a data snapshot of the Microsoft Office Project Server 2003 database from the Projects and Tasks tables and then stored in a table created dynamically within the script. Prior to running the script, instruct your SQL DBA to create a database that will be used to store several data validation tables and content used to validate the success of the migration downstream.

  1. Have the SQL DBA create a database and provide its name.

  2. Run the script after updating the two USE statements to point to the database created in step 1 and the database name of the Project Server 2003 database that is ready for migration.

Script 3

/*---------------------------------------------------------------------------------------
-- Script A3: Capture Data Validation Snapshot for Project Server 2003 ---- Updated Jan 10, 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 [Proj2003SourceDB]
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',
       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