Microsoft KB Archive/823622

= PRJ2000: How to Move the Project Central Database from a Project Server to an SQL Server =

Article ID: 823622

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Project 2000 Standard Edition
 * Microsoft Project Server 2002

-





SUMMARY
This article describes how to move a Microsoft Project Central database from a Microsoft Project Server-based computer to a Microsoft SQL Server.



MORE INFORMATION
To move the Microsoft Project Central database from a Project Server-based computer to an SQL Server, follow these steps:  On the Project Server-based computer, click Start, point to All Programs, point to Accessories, and then click Notepad. Type the following text in a new blank document, where  is the password for the system administrator (sa) account:

osql -U sa -P  -i Detach.sql

 On the File menu, click Save As..., name the file &quot;Detach.bat&quot; (without the quotation marks), and then save the file in a convenient location on the Project Server-based computer. On the File menu, click New to open a new blank document. Type the following text in the new blank document, where  is the name of the Microsoft Project Central database:

 use master go sp_detach_db 'databaseName' go

 On the File menu, click Save As..., name the file &quot;Detach.sql&quot; (without the quotation marks), and then save the Detach.sql file in the same folder as the Detach.bat file.</li> On the SQL Server, click Start, point to All Programs, point to Accessories, and then click Notepad.</li> On the File menu, click New to open a new blank document.</li> Type the following text in the new blank document, where  is the password for the sa account:

osql -U sa -P  -i Attach.sql

</li> On the File menu, click Save As..., name the file &quot;Attach.bat&quot; (without the quotation marks), and then save the file in a convenient location on the SQL server.</li> On the File menu, click New to open a new blank document.</li>  Type the following text in the new blank document, where  is the name of the Project Central database,   is the partition where SQL Server was installed, and   is the folder that contains the Project Central database files: <pre class="fixed_text"> use master go sp_attach_db 'databaseName','Drive:\Path to Data folder for SQL\databaseName.mdf','Drive:\Path to Data folder for SQL\databaseName_log.ldf' go </li> On the File menu, click Save As..., name the file &quot;Attach.sql&quot; (without the quotation marks), and then save the Attach.sql file in the same folder as the Attach.bat file.

Before you run any of the .bat and SQL script files, you must remember to edit each one to change the placeholder for  to be the actual password for the sa account. Also replace the  placeholder with the actual name of the database. Most of the time the file name of the database will be Project_CentralDb. You must also change the  placeholder with the drive letter of the partition where Microsoft SQL Server was installed. Finally, you must change the  placeholder with \Data folder destination of the Microsoft Project Central database.</li> On the Project server, open a command prompt where the Detach.bat and Detach.sql files are located.</li> Run the Detach.bat file on the server where the current database for Microsoft Project Central is installed.</li> Copy the Microsoft Project Central database files (.mdf and .ldf) from the Project server to the SQL Server \Data folder that will serve as the new location for the Microsoft Project Central database.</li> On the SQL Server, open a command prompt where the Attach.bat and Attach.sql files are located.</li> Run the Attach.bat file on the SQL server.</li></ol>

Keywords: kbinfo KB823622

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.