Syntax for dbexport.pl
| OS | Command |
|---|---|
| Windows | dbexport.pl -dbase dbname@ODBC_DSN -o “exportpath” |
| Linux | dbexport.pl -dbase dbname@SID -o “exportpath” |
- Issue the command from any Contenta client workstation that has been installed with the administration tools.
- The output from this command is a single file named dbname.dmp where dbname is the name of the database.
Oracle: The .dmp file is saved on the resident system in the directory specified by the -o switch, or on the Oracle server when the -datapump switch is used.
MSSQL:
- The .dmp file is saved on the MSSQL server in the directory specified by the -o switch. The directory must be an existing directory on the MSSQL server (i.e. it is not created if it does not exist).
- You cannot export a database from another server (ODBC_DSN must be resident).
| Switch | Description |
|---|---|
| -dbase | Required: dbname The name of the Contenta database to export. Windows: dbname@ODBC_DSN —or— Linux: dbname@SID |
| Optional: ODBC_DSN (Windows) The ODBC data source name. If not specified, the default is used—as defined in the environment for XYV_PDM_ODBC_DSN | |
| Optional: SID (Linux) The system identifier. If not specified, the default is used—as defined in the registry for XYE_PDM_DATABASE_SID | |
| datapump -dir dumpdir -o dumpfile —or— -datapump -o dumpdir:dumpfile —or— -datapump -o dumpfile | Optional; for use with Oracle only. The output dumpdir can be specified either with -dir or as a prefix to -o, but not both, otherwise it defaults to the value of the environment/registry variable XYV_PDM_DBDUMP_DIR if set, or “XY_DBDUMP_DIR” if not set. The dump file name should be a simple alphanumeric filename (it is not a path and cannot contain spaces, slashes, or colons). If dump file is not specified (that is, -o is not used), it defaults to XYDB__dbname.dmp (note the double underscore before dbname). If dumpfile is specified, dbexport.pl prepends XY if dumpfile does not begin with XY and appends “__dbname” (double underscore dbname) before “.dmp” if that is not already present. Other than the “__dbname” at the end, the dump file name cannot contain any double underscore characters. Sample commands and resulting dmp file names (all 3 commands include -dbase aaa -datapump -dir XY_DBDUMP_DIR): no -o switch : XYDB__AAA.dmp -o aaa.dmp : XYAAA__AAA.dmp -o bbb.dmp : XYBBB__AAA.dmp Required (Note: If using -datapump, use -o as described with -datapump, not as described here.) Where exportpath is the path to which to export and save the database. MSSQL: Required; relies on registry setting for XYV_PDM_DATAFILEPATH Oracle: Optional; can also specify alternate filename in the format “exportpath/filename”. |
| -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. |
| -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. |
Oracle Only The following switches are Oracle database switches. If you are using an MSSQL database these switches are not available/not necessary. | |
| -sid SID (Windows) | Required if specifying a remote DSN. |
| Optional: SID The system identifier. If not specified, the default is used — as defined in the environment for XYE_PDM_DATABASE_SID | |