Moving Microsoft SQL Server Database to another machine

Moving the Microsoft SQL Server database to a new machine?

1.  Backup and Restore Database

  1. Stop the Secret Server site in Internet Information Server (IIS) to prevent any changes to the database 
    1. You can stop the application pool, or stop IIS website
  2. Backup the database by accessing SQL Management Studio and right click on the database and choose Backup Database
  3. Select a file location for the .bak file. Then transfer this file to the new server.
  4. On the new database server, through SQL Management Studio Restore the database backup
  5. Create and/or Grant access to the account that will be accessing the database for Secret Server (See the Installation Setup Guide for account creation.)
  6. We recommend stopping the old database by taking it offline or stopping the database
2.  Connect Secret Server to New Database (setting the database connection details)
  1. Delete the database.config file from the secretserver folder (on the ASP.NET/IIS machine).
  2. Restart your Secret Server website, so it is running
  3. Browse to your Secret Server, you will be prompted to enter your new database connection details.
  4. Enter your new SQL Server and the account information
  5. Click next and the site will connect to the new Database
  6. Your site is now running using the new database. 

If you need to roll back the change and go back to the original database, then simply start back at Step 1 and move the database back to the original database server.




(LEGACY - ONLY FOR Secret Server 7.1 and older)

2.  
Connect Secret Server to New Database (setting the database connection details)

  1. Make sure you are logged out of Secret Server in your web browser.
  2. Delete the database.config file from the secretserver folder.
  3. Restart Internet Information Server (IIS) by running "iisreset" from the command line OR recycle the application pool used by Secret Server. (Note: A Default Website 'Restart' is not the same as IISReset and will not reload the config files.)
  4. Close your browser, open it again, and point it to the Secret Server website
  5. You will then be taken to the web installer (this is because the database.config file is missing and it thinks you haven't installed yet)
    1. Go through the web installer to step 3
    2. On step 3 enter the new database credentials (new server location, username, password) and click next. Do not click "next" once you reach step 4.
    3. Recycle your application pool or perform an IIS reset
    4. Go to the home.aspx or login page
  6. Your site is now running using the new database. 

If you have any problems or questions, please contact support.

 

Article ID: 175, Created On: 8/2/2011, Modified: 3/19/2012