Oracle7 Enterprise Backup Utility Administrator's Guide | ![]() Library |
![]() Product |
![]() Contents |
![]() Index |
This appendix provides sample command scripts for a sample database. These examples are not exhaustive in terms of all the options and specifiers demonstrated, but the usage for each Enterprise Backup Utility command is covered.
The examples in this appendix relate to a database with the following configuration information:
database name |
PRODB |
ORACLE_SID |
PROD |
ORACLE_HOME |
/opt1/oracle |
pfile |
/opt1/oracle/prod/dbs/initPROD.ora |
The database has the following tablespaces and datafiles in the directory /opt1/oracle/dbs
Tablespace A |
datafiles a1.dbf, a2.dbf, a3.dbf, a4.dbf |
Tablespace B |
datafiles b1.dbf, b2.dbf, b3.dbf |
register log = "/opt1/oracle/ebu/log/obkPROD.log"Example B-2 The following command script updates configuration information about the sample database in the EBU Catalog.
register db_name = "PRODB" pfile = "?/dbs/init@.ora"
The following command scripts demonstrate various backups of the sample database.
backup offline database db_name = "PRODB" log = "/opt1/oracle/ebu/log/obkPROD.log" catalog = noneExample B-4 backup online database with archdelete specified
backup online database archivelog archdelete log = "/opt1/oracle/ebu/log/obkPROD.log"
Note:The archivelog specifier is included only for clarity in the example above, as it is the default action and archdelete will not function if the logs are not first backed up.
Example B-5 backup online with three data streams and no archived logs backed up
backup online archivelog = none parallel = 3 log = "opt1/oracle/ebu/log/obkPROD.log"Example B-6 backup online <subset> of Tablespace A and datafiles b1.dbf and b2.dbf, without catalog backup
backup online db_name = "PRODB" dbfile = "?/dbs/b1.dbf","?/dbs/b2.dbf" tablespace = "A" log = "/opt1/oracle/ebu/log/obkPROD.log" catalog = noneExample B-7 backup online <subset> of Tablespace B with multiplexed datafiles
backup online db_name = "PRODB" tablespace = "B" mux = ("/opt1/oracle/dbs/b1.dbf", "/opt1/oracle/dbs/b2.dbf", "/opt1/oracle/ dbs/b3.dbf") log = "opt1/oracle/ebu/log/obkPROD.log"Example B-8 Catalog-only backup
backup catalog log = "/opt1/oracle/ebu/log/catback.log" buffer_size = 256Example B-9 Backup of catalog and archived redo logs only
backup online db_name = "PRODB" oracle_sid = "PROD" archivelog catalog
The following command scripts demonstrate various restores of the sample database.
restore database consistent db_name = "PRODB" archivelog start_lsn = 41 parallel = 4 log = "/opt1/oracle/ebu/log/obkPROD.log"Example B-11 restore database consistent with two tape devices available and recover to current point in time
restore database consistent db_name = "PRODB" to = "01/01/1995 14:01" parallel = 2 archivelog start_lsn = 12 log = "/opt1/oracle/ebu/log/obkPROD.log" recoverExample B-12 restore database and recover to 12:15 on 9/30/96
restore database db_name = "PRODB" log = "/opt1/oracle/ebu/log/obkPROD.log" recover = "09/30/96 12:15:00"Example B-13 restore database to with DISK_IO_SIZE of 64 database blocks
restore database db_name = "PRODB" to = "01/01/1995 14:01" log = "/opt1/oracle/ebu/log/obkPROD.log" disk_io_size = 64Example B-14 restore <subset> of Tablespace B with remapping of datafile b1.dbf
restore db_name = "PRODB" tablespace = "B" remap = "?/dbs/b1.dbf" TO "?/dbs/b4.dbf" rename log = "/opt1/oracle/ebu/log/obkPROD.log"
Note: ALTER DATABASE RENAME DATAFILE is performed with the rename RENAME operand. If omitted, you must issue the appropriate statements manually. |
restore db_name = "PRODB" dbfile = "?/dbs/b1.dbf","?/dbs/b2.dbf" tablespace = "A" to = "05/26/1995 07:00" parallel = 2 log = "/opt1/oracle/ebu/log/obkPROD.log"Example B-16 Restore of catalog
restore catalog = "ebucat" log = "/opt1/oracle/ebu/log/backcat.log"Example B-17 Restore of catalog to new catalog database
restore catalog = "ebucat" as = "newcat" log = "/opt1/oracle/ebu/log/backcat.log"Example B-18 Restore of catalog to 9/20/96, in a new database
restore catalog = "ebucat"
to = "09/20/96"
as = "newcat"
log = "/opt1/oracle/ebu/log/backcat.log"
![]() ![]() Prev Next |
![]() Copyright © 1997 Oracle Corporation. All Rights Reserved. |
![]() Library |
![]() Product |
![]() Contents |
![]() Index |