Skip to main content
Skip table of contents

CLI cookbook: detaching and attaching a SQL server dSource

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 dSource.

    CODE
    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.  

    CODE
    delphix database "dexample"> detachSourcedelphix database "dexample" detachSource *> set source=dexampledelphix database "dexample" detachSource *> commit
  3. Run the attachSource command.

    CODE
    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.

    CODE
    delphix database "dexample" attachSource *> edit attachDatadelphix database "dexample" attachSource attachData *> set type=MSSqlAttachDatadelphix database "dexample" attachSource attachData *> set config=SQLSERVER/dexampledelphix database "dexample" attachSource attachData *> set sharedBackupLocations="<\\SERVER1\Backups>"delphix database "dexample" attachSource attachData *> set pptRepository=SQL2008R2delphix database "dexample" attachSource attachData *> set mssqlUser.type=MSSqlDomainUserdelphix database "dexample" attachSource attachData *> set mssqlUser.user=ad\dbuserdelphix database "dexample" attachSource attachData *> set mssqlUser.password.password=dbuserpwddelphix database "dexample" attachSource attachData *> edit ingestionStrategydelphix database "dexample" attachSource attachData ingestionStrategy *>set type=ExternalBackupIngestionStrategydelphix database "dexample" attachSource attachData ingestionStrategy *>set validatedSyncMode=TRANSACTION_LOGdelphix database "dexample" attachSource attachData ingestionStrategy *> backdelphix database "dexample" attachSource attachData *> edit operations.preSyncdelphix database "dexample" attachSource attachData  operations.preSync *> backdelphix database "dexample" attachSource attachData*> edit operations.postSyncdelphix database "dexample" attachSource attachData operations.postSync *> back
  5. Commit the operation.

    CODE
    delphix database "dexample" attachSource *> commit

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.