Oracle 10R2 on Solaris.
I am using this method to back up a development database and delete the archivelogs on disk. Normally all backups are to tape, but on an occasion I need to backup up a development database, and backup to disk is the most effective solution for a quick backup.
# rman target / catalog login/password@rman;
.
.
connected to recovery catalog database
I always crosscheck the archive logs to be sure they are in sync with the catalog.
RMAN> change archivelog all crosscheck;
starting full resync of recovery catalog
full resync complete
.
.
RMAN>
To speed things up I like to use 4 channels for the backup. I set the configuration for the Disk Channels at the command line to not override the current RMAN settings.
RMAN> run {
2> ALLOCATE CHANNEL disk1 DEVICE TYPE DISK
3> FORMAT '/oracle_backups/DEV/rman/backups/DEV_%T_%U';
4> ALLOCATE CHANNEL disk2 DEVICE TYPE DISK
5> FORMAT '/oracle_backups/DEV/rman/backups/DEV_%T_%U';
6> ALLOCATE CHANNEL disk3 DEVICE TYPE DISK
7> FORMAT '/oracle_backups/DEV/rman/backups/DEV_%T_%U';
8> ALLOCATE CHANNEL disk4 DEVICE TYPE DISK
9> FORMAT '/oracle_backups/DEV/rman/backups/DEV_%T_%U';
10> BACKUP DATABASE PLUS ARCHIVELOG DELETE INPUT;
11> }
After the backup has competed I want to clean up prior backups still on disk and in the catalog.
Maintainance commands for crosschecks and deleting expired backups
RMAN> ALLOCATE CHANNEL FOR MAINTENANCE DEVICE TYPE DISK;
RMAN> CROSSCHECK BACKUP;
RMAN> DELETE NOPROMPT EXPIRED BACKUP;
RMAN> DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
RMAN> CROSSCHECK ARCHIVELOG ALL;
RMAN> DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
The last 2 commands should return no output if you have deleted the archivelogs during the backup.
Remember your dreams
Subscribe to:
Post Comments (Atom)
Proactive Oracle DBA
This is a series of posts. I am working this to share some of the many scripts I schedule to automatically run to alert me of any current o...
-
Oracle 12.1.0.2.0 RMAN-04006: error from auxiliary database: ORA-12514: TNS:listener does not currently know of service requested i...
-
How to get Oracle's runInstaller to run on Linux or Unix environment using from Windows using Cygwin as an xterm emulator. Download an...
-
A great security measure is to monitor who is trying to unsuccessfully log into your database. Whether it's an innocent developer who fo...
No comments:
Post a Comment