The following script examples show archiving using the ARCHIVE command.
-
Archive database DBC by submitting a job with the following ARC commands:
LOGON tdp/dbc,dbc_password; ARCHIVE DATA TABLES (DBC), RELEASE LOCK, FILE=ARCHIVE; LOGOFF;
-
Archive the journal tables by submitting a job with the following ARC commands:
LOGON tdp/dbc,dbc_password; ARCHIVE JOURNAL TABLES (DBC)ALL,EXCLUDE(DBC), NONEMPTYDATABASES, RELEASE LOCK, FILE=JNLARCH; LOGOFF;
-
Archive user databases:
- If you are certain that the destination system has adequate space for all user data, create a single archive containing all user databases by submitting a job with the following ARC commands:
LOGON tdp/dbc,dbc_password; ARCHIVE DATA TABLES (DBC) ALL, EXCLUDE(DBC), (TD_SYSFNLIB), (CRASHDUMPS), (SYSLIB), (SYSSPATIAL), (SYSBAR) RELEASE LOCK, FILE=USRARCH; LOGOFF;
- If you are not certain that the destination system has adequate space for all user data, create multiple smaller archives instead of archiving all user databases in the same archive.Because this option guards against having to restore all user data more than once if the destination system has inadequate space, it is recommended over archiving all user databases in the same archive. In any case, be sure to exclude databases DBC and TD_SYSFNLIB when archiving user data. It is also recommended that you exclude CRASHDUMPS, SYSLIB, and SYSSPATIAL.
- If you are certain that the destination system has adequate space for all user data, create a single archive containing all user databases by submitting a job with the following ARC commands:
-
Archive database SYSLIB:
LOGON tdp/dbc,dbc_password; ARCHIVE DATA TABLES (SYSLIB) ALL, RELEASE LOCK, FILE=SYSLIBONLY; LOGOFF;