Skip to main content
Skip table of contents

CLI cookbook: detaching and attaching a SAP ASE dSource

This CLI cookbook recipe describes how to Detach and Attach an SAP ASE dSource using the CLI.

Prerequisites

A dSource can only be attached to a new data source once it has been unlinked.
When attaching an SAP ASE dSource to a new data source, the new data source must be the same logical database satisfying the following constraints:

  • Same dbid

  • Same dbname

  • Same creation time

You must also make sure that you follow the normal prerequisites for an SAP ASE data source found in SAP ASE Support and Requirements.

Procedure

Detach a dSource

  1. Login to the CLI as admin or a user with Admin privileges.

  2. Select dSource.

    CODE
    delphix> database "dexample"
  3. Run the detachSourcecommand, specifying the currently active source. Note: This step can be skipped if the dSource has already been detached through the GUI.

    CODE
    delphix database "dexample"> detachSource
    delphix database "dexample" detachSource *> set source=dexample
    delphix database "dexample" detachSource *> commit

Attach a dSource

  1. Login to the CLI as admin or a user with Admin privileges.

  2. Run the attachSource command.

    CODE
    delphix database "dexample"> attachSource
    delphix database "dexample" attachSource *> set attachData.config=dexample
    delphix database "dexample" attachSource *> set attachData.dbCredentials.password=sybase
    delphix database "dexample" attachSource *> set attachData.dbUser=sa
    delphix database "dexample" attachSource *> set attachData.loadBackupPath=/tmp/backups
    delphix database "dexample" attachSource *> set attachData.sourceHostUser="source_host_environment/sybase"
    delphix database "dexample" attachSource *> set attachData.stagingHostUser="staging_host_environment/sybase"
    delphix database "dexample" attachSource *> set attachData.stagingRepository="staging_ASE_servername_example"
    delphix database "dexample" attachSource *> ls
    Properties
      
        type: ASEAttachSourceParameters
      
        attachData:
      
            type: ASEAttachData
      
            config: dexample (*)
      
            dbCredentials:
      
                type: PasswordCredential
      
                password: ******** (*)
     
            dbUser: sa (*)
             
            dumpCredentials: (unset)
     
            externalFilePath: (unset)
      
            loadBackupPath: /tmp/backups (*)
      
            loadLocation: (unset)
     
            mountBase: (unset)
      
            operations: (unset)
      
            sourceHostUser: source_ASE_servername_example/sybase (*)
      
            stagingHostUser: staging_ASE_servername_example/sybase (*)
      
            stagingPostScript: (unset)
      
            stagingPreScript: (unset)
      
            stagingRepository: staging_ASE_servername_example (*)
         
            validatedSyncMode: ENABLED
      
    delphix database "dexample" attachSource *> commit
      
        ASE_DB_CONTAINER-3
      
        Dispatched job JOB-25
      
        DB_ATTACH_SOURCE job started for "Untitled/dexample".
      
        DB_ATTACH_SOURCE job for "Untitled/dexample" completed successfully.

This command is only necessary if you are using a Remote Backup Server configuration from staging to the source, instead of an NFS mounted shared directory for backups and transaction log dumps:

CODE
delphix database "dexample" attachSource *> set attachData.loadLocation.backupServerName=source_backupserver_name_example
JavaScript errors detected

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

If this problem persists, please contact our support.