This topic describes how to detach and attach a SQL server dSource. When attaching a SQL Server dSource to a new data source, the new data source must be in the same database satisfying the following constraints:
- pptRepository needs to be set to the name of the SQL instance on the staging server. The unlink operation removes the database from the SQL instance on the staging server and unmounts the iscsi luns, reattaching the dSource via the CLI will remount the iscsi luns and puts the database back.
Prerequisites
A dSource can only be attached to a new data source once it has been unlinked.
Procedure
1. Select the dSource.
delphix> database "dexample"
2. Run the detachSourcecommand, specifying the current active source. This step can be skipped if the dSource has already been detached. through the GUI.
delphix database "dexample"> detachSource delphix database "dexample" detachSource *> set source=dexample delphix database "dexample" detachSource *> commit
3. Run the attachSource
command.
delphix database "dexample"> attachSource
4. Set the following for SQL Server:
You can also type help pptRepository to see what is wanted
You can also set pptRepository=<then press tab> to list all values.
delphix database "dexample" attachSource *> set source.config=SQLSERVER/dexample delphix database "dexample" attachSource *> set source.sharedBackupLocation=\\SERVER1\Backups delphix database "dexample" attachSource *> set pptRepository=SQL2008R2 delphix database "dexample" attachSource *> set dbUser=dbuser delphix database "dexample" attachSource *> set dbCredentials.password=dbuserpwd delphix database "dexample" attachSource *> edit source.operations.preSync delphix database "dexample" attachSource source.operations.preSync *> back delphix database "dexample" attachSource *> edit source.operations.postSync delphix database "dexample" attachSource source.operations.postSync *> back
5. Commit the operation.
delphix database "dexample" attachSource *> commit