PRJ2000: How to Move the Project Central Database from a Project Server to an SQL Server (823622)



The information in this article applies to:

  • Microsoft Project 2000
  • 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:
  1. On the Project Server-based computer, click Start, point to All Programs, point to Accessories, and then click Notepad.
  2. Type the following text in a new blank document, where password is the password for the system administrator (sa) account:

    osql -U sa -P password -i Detach.sql

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

     use master
    go
    sp_detach_db 'databaseName'
    go

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

    osql -U sa -P password -i Attach.sql

  10. On the File menu, click Save As..., name the file "Attach.bat" (without the quotation marks), and then save the file in a convenient location on the SQL server.
  11. On the File menu, click New to open a new blank document.
  12. Type the following text in the new blank document, where databaseName is the name of the Project Central database, Drive is the partition where SQL Server was installed, and Path to Data folder for SQL is the folder that contains the Project Central database files:

    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

  13. On the File menu, click Save As..., name the file "Attach.sql" (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 password to be the actual password for the sa account. Also replace the databaseName 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 Drive placeholder with the drive letter of the partition where Microsoft SQL Server was installed. Finally, you must change the Path to Data for SQL placeholder with \Data folder destination of the Microsoft Project Central database.
  14. On the Project server, open a command prompt where the Detach.bat and Detach.sql files are located.
  15. Run the Detach.bat file on the server where the current database for Microsoft Project Central is installed.
  16. 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.
  17. On the SQL Server, open a command prompt where the Attach.bat and Attach.sql files are located.
  18. Run the Attach.bat file on the SQL server.
The following Microsoft Web site describes script files that you can download to back up and restore the database. To review the Microsoft Project 2000 Resource Kit for information about how to administer the Microsoft Project Central database, visit the following Microsoft Web site:

Modification Type:MinorLast Reviewed:7/27/2006
Keywords:kbinfo KB823622 kbAudITPRO