Database maintenance commands
These topics describe the Contenta database maintenance command utilities.
Note: The term Contenta database is used to indicate the tables that hold the data, metadata, and related information for Contenta. If you are using Contenta with Oracle, the term Contenta database refers to the Oracle user.
Command utilities are located in the bin directory under the Contenta_home directory unless otherwise noted. They are executed from an OS command prompt on a workstation or on the server. When executed on a workstation, the workstation must have a Custom install which installs the command programs.
Note: When running some of the command utilities, if you did not add the database user to the XyConfig.bin using dbpwdmg, you see a message that the default password is being used:
INFO: A password for the database is not set in the password file. Using default database password.
This is an informational message only and you can continue using the utility. To eliminate the message from being displayed, add the database user to XyConfig.bin. See Modifying the Database Passwords, Create Password Procedure.
Note: If you use Contenta with Oracle and you want to start using Oracle’s Data Pump utilities, note the following:
- Oracle Data Pump configuration: You must configure Data Pump, including the creation of an Oracle Directory Object, before you can use the
-datapumpswitch with Contenta’s dbexport.pl, dbimport.pl, or dbcopy.pl database commands. See Configuring Oracle Data Pump for use with Contenta. - Changed behavior with
-datapump: When dbexport.pl, dbimport.pl, or dbcopy.pl is used with-datapump, the behavior of these commands changes as follows:- The database dump files exported by dbexport.pl or dbcopy.pl are created on the Oracle server, not the client. The database dump files imported by dbimport.pl or dbcopy.pl must be located on the Oracle server, not the client.
- The Oracle log files are created (by dbexport.pl, dbimport.pl, or dbcopy.pl) on the Oracle server, not the client.
- These server-side files require an existing Oracle Directory Object, which may be specified on the command line.
- Since Oracle’s Data Pump import tool requires the source database name, the dbexport.pl output dump file name must contain the name of the database that was exported. You can supply this name to dbimport.pl, but it is usually easier to have it automatically appended by dbexport.pl, so that dbimport.pl will extract it from the input dump file name and you won’t have to supply it on the command line.
- Compatibility with old database dump files: Database dump files created without
-datapumpmay not be imported with-datapump(because Oracle’s impdp is incompatible with Oracle’s exp). If you need to import a pre-DataPump dump file, you will need to reimport it using dbimport.pl without the-datapumpswitch. From there you can export it using dbexport.pl with-datapump.
- Recommended Frequency of Use
The following information can be used to help you determine how often or when to execute the commands. - Executing Command utilities
Most commands respond to the-helpswitch with a usage statement that contains the full syntax of the command. - Configuring Oracle Data Pump for use with Contenta
In Contenta 5.1 and higher, Contenta’sdbexport,dbimport, anddbcopydatabase commands may be used in conjunction with Oracle’s Data Pump utilities: export may useexpdprather thanexp, and import may useimpdprather thanimp. - New Database Command
The new database (newdb.pl) command creates a new Contenta database using the Contenta schema. - Database Copy Command
Use the database copy (dbcopy.pl) command to create a copy of an existing Contenta database. - Drop Database Command
Use the drop database (dropdb.pl) command when you want to delete, that is remove tables and data for, a Contenta database (or Oracle user). - Database Export Command
The database export (dbexport.pl) command allows you to export a database to a file on the operating system. - Database Import command
Use the Database Import command to create a Contenta database from a previously exported Contenta database. The exported database files is created with the database export command. - List Database Command
The list database (listdb.pl) command displays a list of Contenta databases. - Contenta Sessions Command
Use the Contenta sessions (pcmsessions) command to list or clear session records from the Contenta database. - Binary Large Object Check command
The the binary large object (BLOb) checkblobs command check the BLOb space in your database. - Obtaining Diagnostic Data for Bad BLObs
You can use the dumpobj and showobj tools to obtain information for diagnosing problems about bad BLObs. - Verify Locks command
Use the verify locks (verilk) command to check and repair: - Update Indexes Command
Use the pcm_update_indexes.pl command to rebuild all database indices and store them in specified tables. - Reset Linkend Sequence script
Th Reset Linkend Sequence script is needed for SDL Contenta customers who use Link Manager, and for all SDL Contenta S1000D customers - whether or not they use Link Manager. - Database Statistics
Use the dbstat command to display information about your database files including the location, file name, and size of the data files. - Compute Stats Command
The compute stats (pcm_compute_stats.pl) command executes an Oracle program to analyze and compute statistics on each table in the specified Contenta database. - Parent list trim command
The parent list trim (pltrim) command removes erroneous entries (orphans) in the parent list—those are entries that were not deleted when they should have been, as well as duplicate entries. - The Deletion Tool
Use the Contenta deletion tool (reap_delete) to remove inactive objects from a Contenta database. - Tips and Troubleshooting
Related concepts