Moving the Microsoft SQL Server Database to Another Machine
Follow the steps below for moving MS SQL Server database for Secret Server.
Task 1: Backing up and Restoring the Database
To back up your Secret Server installation:
-
Enable the maintenance mode.
-
Stop the Secret Server site in Internet Information Server (IIS) to prevent any changes to the database.
-
Navigate to the directory where Secret Server is installed.
-
Copy the folder (holding the application) to your back up location.
-
Open your SQL Server Management Studio.
-
Right click the database your Secret Server is running on, and select Tasks > Backup.
-
Click the Add button. You are prompted to enter a file path for the
.bakfile. This can be the final destination (not recommended) or a temporary one (for later moving to a back up location). -
Make sure SQL Server has permissions for this location. That is, create (if needed) and or grant access to the account that will access the database (see the Installation for account creation instructions). See Running the IIS Application Pool As a Service Account (Task 2) for details.
-
Copy the resulting database backup file (
.bak) to your backup location.
osql -S myserver\SQLEXPRESS -E - Q "BACKUP DATABASE SECRETSERVER TO DISK = 'c:\backup\ss.bak'.See Restoring Secret Server from a Backup for restoring instructions.
Task 2: Connecting Secret Server to the New Database
Use one of the following methods, depending on whether Secret Server can still reach the old database.
C:\inetpub\wwwroot\Secretserver\database.config. You can back that file up to revert, or return to the pages below to reset the connection again. See the Privilege Manager documentation if you need to change its configuration too.If You Can Still Log On (Old Database Still Online)
-
Restart your Secret Server website in IIS.
-
Log on Secret Server as a local admin with the Administer Configuration role permission.
-
Search for Database to open the Database Configuration page.
-
Click the Edit button. The page becomes editable.
-
Type your new SQL Server location (server name) and database.
-
Click the Save Database Connection Settings button. Secret Server recycles its application pool and connects to the new database.
For details, see Changing SQL Server Connection Parameters.
If Secret Server Cannot Reach the Old Database
If the old database is already offline, you cannot log on. Secret Server instead shows the Unable to access database page.
-
On the web server, open a browser and navigate to Secret Server using
localhost, such ashttp://localhost/secretserver. The Unable to access database page opens. This page must be opened from the web server itself. -
Click Configure database. The Configure database page (
/app/#/install/configure-database) opens. -
In Server name and Database name, type the new SQL Server location and database.
-
Under SQL Authentication, select the same method you used before. If you use SQL Server authentication, enter the Username and Password. For the options, see Installing and Configuring SQL Server.
-
Click Save connection information. Secret Server applies the settings and reloads.
/Setup/Database. Use it if the Configure database page cannot complete.After Reconnecting
Your site is now pointing to the new database. Reactivate your licenses by going to the Licenses page. Secret Server license activation requires both the license and the Secret Server database, so changing the database connection details requires a new activation. If you do not reactivate, Secret Server goes into limited mode: you can still view passwords, but many other features are disabled, such as creating secrets, editing secrets, changing permissions, and using web services. For details, including offline activation for environments without outbound access to delinea.com, see the License Activation FAQ.