This topic describes how to use the command line interface to link an ASE database by loading from the most recent full backup of the source database.

Procedure

Enter the following commands in the Delphix Engine command line interface:

ssh delphix_admin@delphix
Password: 
delphix> /database link
delphix database link *> set linkData.type=ASELinkData
delphix database link *> set name=db2
delphix database link *> set group="ASE dSource"
delphix database link *> set linkData.config=db2
delphix database link *> set linkData.dbUser=sa
delphix database link *> set linkData.dbCredentials.password=sybase
delphix database link *> set linkData.loadBackupPath=/mnt/dump
delphix database link *> set linkData.mountBase=/mnt/provision/vdb_or_staging_database_name
delphix database link *> set linkData.sourceHostUser=nealorarh75/sybase
delphix database link *> set linkData.sourceHostUser=nstackrh69/sybase
delphix database link *> set linkData.stagingHostUser=nealorarh75/sybase
delphix database link *> set linkData.stagingRepository=ASE157SP138
delphix database link *> set linkData.sourcingPolicy.logsyncEnabled=true
delphix database link *> set linkData.sourcingPolicy.type=SourcingPolicy
delphix database link *> unset linkData.syncParameters
delphix database link *> edit linkData.syncParameters
delphix database link linkData.syncParameters *> back
delphix database link *> ls
Properties
    type: LinkParameters
    name: db2 (*)
    description: (unset)
    group: ASE dSource (*)
    linkData:
        type: ASELinkData
        config: db2 (*)
        dbCredentials:
            type: PasswordCredential
            password: ******** (*)
        dbUser: sa (*)
        dumpCredentials: (unset)
        externalFilePath: (unset)
        loadBackupPath: /mnt/dump (*)
        loadLocation: (unset)
        mountBase: /mnt/provision/vdb_or_staging_database_name (*)
        operations: (unset)
        sourceHostUser: nstackrh69/sybase (*)
        sourcingPolicy:
            type: SourcingPolicy (*)
            logsyncEnabled: true (*)
        stagingHostUser: nealorarh75/sybase (*)
        stagingPostScript: (unset)
        stagingPreScript: (unset)
        stagingRepository: ASE157SP138 (*)
        syncParameters:
            type: ASELatestBackupSyncParameters (*)
        validatedSyncMode: ENABLED

Operations
defaults
delphix database link *> commit
    `ASE_DB_CONTAINER-209
    Dispatched job JOB-3704
    DB_LINK job started for "ASE dSource/db2".
    DB_LINK job for "ASE dSource/db2" completed successfully.

mountBase option

The mountBase parameter is an option that was added in Delphix 5.2 and higher. By default, Delphix mounts the staging database under the Delphix toolkit directory. If a directory is specified for this parameter, the staging database's NFS devices will be mounted under this directory rather than under the toolkit directory. This can be especially helpful when the dSource is linked with LogSync enabled. ASE has a limit on 127 characters for the fully qualified path to the transaction logs specified in the "LOAD TRANSACTION" statement. When LogSync is enabled, Delphix keeps a copy of the transaction logs on the engine under the dSources "archive" folder. The default naming convention for the folders under the toolkit can easily cause the 127 character limit to be exceeded so it is highly recommended to use this parameter when enabling LogSync. The mountBase is limited to 87 characters ( the device names Delphix generates are 32 characters and the subdirectory containing the archive files is about 8 characters long). This leaves approximately 40 characters for the name of the transaction logs themselves. The mountBase parameter must be unique for each VDB or staging database. The path can reside under a common parent directory for example, /mnt/provision but you must specify a unique child directory under the parent for each VDB or staging database using this optional parameter.