How to Move a Project (Microsoft SQL Server)

Moving a project between database servers (such as database servers running on different computers) requires several steps: detaching the project from the old server, moving it, creating a preferences file for it, and attaching it to the new server.

  1. To detach a project, start the Microsoft SQL Server Query Analyzer.
  2. If you have not changed the default database administrator account information, complete the Administrator option with "sa" and leave the Password option blank

    Detach the project from the server using a command like the following:

    EXEC sp_detach_db @dbname = "MyProject"

    GO

  3. To move the project, select all of the files in the project directory and move them to their new location.

    One way to do this is to use the Windows Explorer Copy command to select all of the files in the \archibus\projects\myproject\data folder, find the new project folder, and then use the Paste command to paste the files into the new project folder, \archibus\projects\newproject\data .

    If you have the database files on a database server computer and the project files on a separate file server computer, you will need to move the files in two steps:

    1. First, move the database and log file (.mdf and .ldf file) to a folder on the new database server computer.
    2. Next, copy the files in the project folder (e.g. the .dwg files) to the project folder on the new file server computer.
  4. Make a new entry in the project list ( afm-projects.xml ) for this project. Use the same parameters as when using the command to create a new project. See Configure project preferences and Adding a New Project .
  5. Run the script to map your database accounts and grant permissions. For more details see: Starting Microsoft SQL Server Projects

You can also refer to the "Attaching a Single File Database" in the SQL Server Books Online manual.