Skip to content

dx_ctl_dsource

Marcin Przepiorowski edited this page Mar 21, 2019 · 8 revisions

SYNOPSIS

dx_ctl_dsource [ -engine|d <delphix identifier> | -all ] [ -configfile file ]
 -action create, attach, detach
 -type dsourcetype
 -sourcename name
 -dsourcename dsourcename
 -group groupname
 -sourceinst source_instance
 -sourceenv source_environment
 -dbuser username
 -password password
 -source_os_user osusername
 [-creategroup]
 [-logsync yes/no ]
 [-stageinst staging_inst ]
 [-stageenv staging_env ]
 [-stage_os_user staging_osuser ]
 [-backup_dir backup_dir ]
 [-dumppwd password ]
 [-mountbase mountpoint ]
 [-validatedsync mode ]
 [-delphixmanaged yes/no ]
 [-cdbcont container -cdbuser user -cdbpass password]
 [-debug ]
 [-version ]
 [-help|? ]

DESCRIPTION

Create or attache dSource to a Delphix Engine

ARGUMENTS

Delphix Engine selection - if not specified a default host(s) from dxtools.conf will be used.

  • -engine|d Specify Delphix Engine name from dxtools.conf file
  • -all Display databases on all Delphix appliance
  • -configfile file Location of the configuration file. A config file search order is as follow:
  • configfile parameter
  • DXTOOLKIT_CONF variable
  • dxtools.conf from dxtoolkit location

dSource arguments

  • -type Type (oracle|sybase|mssql|db2|vfiles)

  • -action Action - create, attach, detach, update

    Update action can change a backup path and validated sync mode for MS SQL and Sybase dsources

  • -group Source Group Name

  • -sourcename Database Name

  • -dsourcename dSource name

  • -sourceinst source_instance Source database instance / home

  • -sourceenv source_environment Source database environment name

  • -dbuser username Database user

  • -password password Database password

  • -source_os_user osusername Source database os user

  • -stageinst staging_inst Staging database instance

  • -stageenv staging_env Staging database environment

  • -stage_os_user staging_osuser Staging database os user

  • -backup_dir backup_dir Backup location. From Delphix 5.2.3 multiple backup locations with comma separation can be specified for MS SQL dSource.

  • -logsync yes/no Enable or no LogSync for dSource. Default LogSync is disabled.

  • -dumppwd password Password for backup used to create dsource

  • -mountbase mountpoint For Sybase only - mount point for staging server

  • -validatedsync mode Set validated sync mode.

    Allowed values for MS SQL: TRANSACTION_LOG, FULL, FULL_OR_DIFFERENTIAL, NONE

    Allowed values for Sybase: NONE, ENABLED

  • -delphixmanaged yes/no Use Delphix Manage backup mode for MS SQL

  • -cdbcont container Oracle only - CDB container for a PDB dSource

  • -cdbuser user Oracle only - CDB user for a PDB dSource

  • -cdbpass password Oracle only - CDB password for a PDB dSource

  • -creategroup Create a Delphix group if it doesn't exist

  • -hadr hadrPrimarySVC:XXX,hadrPrimaryHostname:hostname,hadrStandbySVC:YYY Add DB2 dSource with HADR support Parameter hadrTargetList is optional.

    ex. hadrPrimarySVC:50001,hadrPrimaryHostname:marcindb2src.dcenter,hadrStandbySVC:50011,hadrTargetList:marcindb2src.dcenter:50001

OPTIONS

  • -help Print this screen
  • -debug Turn on debugging

EXAMPLES

Create a Sybase dSource from database called pub3 running on instance LINUXSOURCE discovered in environment LINUXSOURCE, staging environment is on LINUXTARGET environment with instance named LINUXTARGET

dx_ctl_dsource -d Landshark5 -type sybase -sourcename pubs3 -sourceinst LINUXSOURCE -sourceenv LINUXSOURCE \
               -source_os_user delphix -dbuser sa -password delphixdb -group Sources -dsourcename "Sybase dsource" \
               -stage_os_user delphix -stageinst LINUXTARGET -stageenv LINUXTARGET -backup_dir "/u02/sybase_back"
               -action create -dumppwd xxxxxx
Waiting for all actions to complete. Parent action is ACTION-2995
Action completed with success.

Create an Oracle dSource from database unique name TESTU running from Oracle Home "/u01/app/oracle/product/11.2.0/dbhome_1" discovered in environment LINUXSOURCE

dx_ctl_dsource -d Landshark5 -type oracle -sourcename TESTU -sourceinst /u01/app/oracle/product/11.2.0/dbhome_1 \
               -sourceenv LINUXSOURCE -source_os_user delphix -dbuser delphixdb -password delphixdb -group Sources \
               -dsourcename "ORACLE dsource" -action create
Waiting for all actions to complete. Parent action is ACTION-3011
Action completed with success.

Create an MSSQL dSource from database unique name AdventureWorksLT2008R2 running on MSSQLSERVER instance discovered in environment WINDOWSSOURCE, staging environment is on WINDOWSTARGET environment with instance named MSSQLSERVER

dx_ctl_dsource -d Landshark5 -type mssql -sourcename AdventureWorksLT2008R2 -sourceinst MSSQLSERVER \
               -sourceenv WINDOWSSOURCE -source_os_user "DELPHIX\delphix_admin" -dbuser aw -password delphixdb \
               -group Sources -dsourcename AdventureWorksLT2008R2 -stage_os_user "DELPHIX\delphix_admin"
               -stageinst MSSQLSERVER - stageenv WINDOWSTARGET -backup_dir "\\\\172.16.180.133\\backups" -action create
Waiting for all actions to complete. Parent action is ACTION-3050
Action completed with success.

Detach dsource

dx_ctl_dsource -d Landshark5 -action detach -dsourcename "Sybase dsource"
Waiting for all actions to complete. Parent action is ACTION-3050
Action completed with success.

Attach Sybase dsource

dx_ctl_dsource -d Landshark5 -action attach -type sybase -sourcename pubs3 -sourceinst LINUXSOURCE -sourceenv LINUXSOURCE \
               -source_os_user delphix -dbuser sa -password delphixdb -group Sources -dsourcename "Sybase dsource" \
               -stage_os_user delphix -stageinst LINUXTARGET -stageenv LINUXTARGET -backup_dir "/u02/sybase_back"
Waiting for all actions to complete. Parent action is ACTION-12699
Action completed with success

Attach Oracle dsource

dx_ctl_dsource -d Landshark5 -action attach -type oracle -sourcename TESTU -sourceinst /u01/app/oracle/product/11.2.0/dbhome_1 \
                             -sourceenv LINUXSOURCE -source_os_user delphix -dbuser delphixdb -password delphixdb \
                             -group Sources -dsourcename "Oracle dsource"
Waiting for all actions to complete. Parent action is ACTION-12691
Action completed with success

Adding an Oracle PDB dSource

dx_ctl_dsource -d Landshark5 -action create -sourcename PDB1 -type oracle -sourceinst /u01/app/oracle/12.2.0.1/db1 \
                             -sourceenv LINUXSOURCE -source_os_user oracle -dbuser delphixdb -password delphixdb -group Sources \
                             -dsourcename PDB1 -cdbcont test122 -cdbuser c##delphixdb -cdbpass delphixdb
Setting credential for CDB test122 sucessful.
Waiting for all actions to complete. Parent action is ACTION-13947
Action completed with success

Adding a DB2 dSource without HADR dx_ctl_dsource -d 531 -stage_os_user auto1052 -stageenv marcindb2tgt -stageinst "auto1052 - 10.5.0.5 - db2aese" -action create -type db2 \ -sourcename R74D105D -dsourcename dsourceR74D105D -group Untitled -backup_dir "/db2backup" Waiting for all actions to complete. Parent action is ACTION-1870 Action completed with success

Adding a DB2 dSource with HADR

dx_ctl_dsource -d 531 -stage_os_user auto1052 -stageenv marcindb2tgt -stageinst "auto1052 - 10.5.0.5 - db2aese" -action create -type db2 \
                      -sourcename R74D105E  -dsourcename R74D105E -group Untitled -backup_dir "/db2backup" \
                      -hadr "hadrPrimarySVC:50001,hadrPrimaryHostname:marcindb2src.dcenter,hadrStandbySVC:50011,hadrTargetList:marcindb2src.dcenter:50001"
Waiting for all actions to complete. Parent action is ACTION-1879
Action completed with success

Updating a backup path and validated sync mode for Sybase

dx_ctl_dsource -d Landshark5 -action update -validatedsync ENABLED -backup_dir "/u02/sybase_back" -dsourcename pubs3
Waiting for all actions to complete. Parent action is ACTION-20194
Action completed with success

Updating a backup path and validated sync mode for MS SQL

 dx_ctl_dsource -d Landshark5 -action update -validatedsync FULL -backup_dir "\\\\172.16.180.10\\loc1,\\\\172.16.180.10\\loc2" -dsourcename AdventureWorks2012
 Waiting for all actions to complete. Parent action is ACTION-20190
 Action completed with success
You can’t perform that action at this time.