CLI cookbook: linking an SAP ASE database loading from the last full backup of the source database
This topic describes how to use the command-line interface to link an SAP 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@delphixPassword: delphix> /database linkdelphix database link *> set linkData.type=ASELinkDatadelphix database link *> set name=db2delphix database link *> set group="ASE dSource"delphix database link *> set linkData.config=db2delphix database link *> set linkData.dbUser=sadelphix database link *> set linkData.dbCredentials.password=sybasedelphix database link *> set linkData.loadBackupPath=/mnt/dumpdelphix database link *> set linkData.mountBase=/mnt/provision/vdb_or_staging_database_namedelphix database link *> set linkData.sourceHostUser=nstackrh69/sybasedelphix database link *> set linkData.stagingHostUser=nealorarh75/sybasedelphix database link *> set linkData.stagingRepository=ASE157SP138delphix database link *> set linkData.sourcingPolicy.logsyncEnabled=truedelphix database link *> set linkData.sourcingPolicy.type=SourcingPolicydelphix database link *> unset linkData.syncParametersdelphix database link *> edit linkData.syncParametersdelphix database link linkData.syncParameters *> backdelphix database link *> lsProperties type: LinkParameters name: db2 (*) description: (unset) group: ASE dSource (*) linkData: type: ASELinkData config: db2 (*) dbCredentials: type: PasswordCredential password: ******** (*) dbUser: sa (*) dumpCredentials: (unset) dumpHistoryFileEnabled: false 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 (*) stagingOperations: (unset) stagingPostScript: (unset) stagingPreScript: (unset) stagingRepository: ASE157SP138 (*) syncParameters: type: ASELatestBackupSyncParameters (*) validatedSyncMode: ENABLEDOperationsdefaultsdelphix 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. SAP ASE has a limit of 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.xs