Syntax for dbcopy.pl

OSCommand
Windowsdbcopy.pl dbname@ODBC_DSN newdbname@ODBC_DS
Linuxdbcopy.pl dbname@SID newdbname@SID

Issue the command from any Contenta client that has been installed with the administration tools.

MSSQL: You cannot copy from one MSSQL server to another server.

SwitchDescription

Windows:

dbname@ODBC_DSN

—or—

Linux:

dbname@SID

Required: dbname

The name of the existing Contenta database.

Optional: ODBC_DSN (Windows)

The ODBC data source name. If not specified, the default is used—as defined in the registry for XYV_PDM_ODBC_DSN

Optional: SID (Linux)

The system identifier. If not specified, the default is used—as defined in the registry for XYV_PDM_DATABASE_SID

Windows:

newdbname@ODBC_DSN

—or—

Linux:

newdbname@SID

newdbname is required.

The name of the new Contenta database.

Optional: ODBC_DSN (Windows)

The ODBC data source name. If not specified, the default is used—as defined in the registry for XYV_PDM_ODBC_DSN

Optional: SID (Linux)

The system identifier. If not specified, the default is used—as defined in the registry for XYV_PDM_DATABASE_SID

-xyadminpwd xyadmin_pwd

Optional if password is default, manager.

Required if password is not default; see Adding and Changing the Database Passwords.

This is the password for the Oracle or MSSQL database.

-pdmpwd db_passwd

Optional if password is the default, pcmuser.

Required if password is not default; see Adding and Changing the Database Passwords.

This is the password for the Contenta database.

-tmp tmpdir

Optional

Specify the directory path to which to copy the database before importing.

If not specified, the $tmp or %temp% directory path is assumed.

Oracle Only The following switches are Oracle database switches. If you are using an MSSQL database these switches are not available/not necessary.

-datapump -dir dumpdir

—or—

-datapump

Optional

The dumpdir is an Oracle Directory Object, a pointer to a physical directory on the Oracle server where the export dump file is written and then read. If -dir dumpdir is not specified, dbcopy.pl defaults to the value of the environment/registry variable XYV_PDM_DBDUMP_DIR if set, or “XY_DBDUMP_DIR” if not set.

The database dump file name will be of the form “XYCPPID__dbname.dmp” (double underscore dbname).

-src_sid serverid

Optional, Source Server SID

Use this switch if the database to be copied is on a different server or in a different SID than the default SID.

Specify the source database SID as defined in the tnsnames.ora file on the system from which you are issuing the command.

Note that the server specified for the source database SID and the server specified as the ODBC_DSN in the variable dbname@ODBC_DSN must be the same server.

-dst_sid serverid

Optional, Destination Server SID

Use this switch if the new database (copied database) is on a different server or in a different SID than the default SID.

Specify the destination database SID as defined in the tnsnames.ora file on the system from which you are issuing the command.

Note that the server specified for the source database SID and the server specified as the ODBC_DSN in the variable newdbname@ODBC_DSN must be the same server.

-tblspace tblspacename

Optional

Where tblspacename is the name of the tablespace for application data.

Default: As defined in the variable

XYV_PDM_TABLESPACE

-tmptblspace tmptblspacename

Optional

Where tmptblspacename is the name of the temporary tablespace.

Default: As defined in the variable

XYV_PDM_TMPTBLSPACE

-indxtblspace indxtblspacename

Optional

Where indxtblspacename is the name of the index table space.

Default: As defined in the variable

XYV_PDM_INDXTBLESPACE