Saturday, August 18, 2012

RMAN reporting & configuration in Oracle on AWS

Initiated an Oracle instance on AWS. In this posts I'll review some of the reporting and backup/recover using RMAN.
Log into to the instance (AWS/Oracle) using password. Start RMAN and let's investigate.
 
01login as: oracle
02oracle@ec2-23-22-205-159.compute-1.amazonaws.com's password:
03oracle@domU-12-31-39-00-7C-94:[/home/oracle]
04$
05oracle@domU-12-31-39-00-7C-94:[/home/oracle]
06$
07oracle@domU-12-31-39-00-7C-94:[/home/oracle]
08$ rman target=orcl
09
10Recovery Manager: Release 11.1.0.7.0 - Production on Fri Jun 8 18:01:12 2012
11
12Copyright (c) 1982, 2007, Oracle. All rights reserved.
13
14target database Password:
15connected to target database: ORCL (DBID=1313137175)
16
17RMAN> list backup;
18
19using target database control file instead of recovery catalog
20
21RMAN>
Now, we are in RMAN and realize there are no backups.
Let's check of the database's configuration like, archivelog mode, FRA configureation etc...
 
01$ sqlplus / as sysdba
02
03SQL*Plus: Release 11.1.0.7.0 - Production on Fri Jun 8 18:01:43 2012
04
05Copyright (c) 1982, 2008, Oracle. All rights reserved.
06
07
08Connected to:
09Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
10With the Partitioning, OLAP, Data Mining and Real Application Testing options
11
12SQL> show user;
13USER is "SYS"
14SQL> archive log list;
15Database log mode Archive Mode
16Automatic archival Enabled
17Archive destination USE_DB_RECOVERY_FILE_DEST
18Oldest online log sequence 5
19Next log sequence to archive 7
20Current log sequence 7
21SQL>
Well the database is in archivelog mode; Let's check the RMAN configuration...
 
01RMAN> show all;
02
03using target database control file instead of recovery catalog
04RMAN configuration parameters for database with db_unique_name ORCL are:
05CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
06CONFIGURE BACKUP OPTIMIZATION OFF; # default
07CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
08CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
09CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
10CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
11CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
12CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
13CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
14CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
15CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
16CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
17CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u02/admin/orcl/osbws/libosbws11.so';
18CONFIGURE MAXSETSIZE TO UNLIMITED; # default
19CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
20CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
21CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
22CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'TAPE';
23CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.1.0/db_1/dbs/snapcf_orcl.f'; # default
24
25RMAN>
This instance is designed for OSB (Oracle Secure Backup) with SBT as default, with channel defined for SBT. We'll change the default to disk.
 
1RMAN> configure default device type to disk;
2
3old RMAN configuration parameters:
4CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
5new RMAN configuration parameters:
6CONFIGURE DEFAULT DEVICE TYPE TO DISK;
7new RMAN configuration parameters are successfully stored
8
9RMAN>
Now we'll CLEAR the tape related configurations...
 
1RMAN> configure default device type to disk;
2
3old RMAN configuration parameters:
4CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
5new RMAN configuration parameters:
6CONFIGURE DEFAULT DEVICE TYPE TO DISK;
7new RMAN configuration parameters are successfully stored
8
9RMAN>
Notice with the TAPE CLEAR... all values are set to #default
 
01RMAN> CONFIGURE DEVICE TYPE SBT_TAPE clear;
02
03RMAN configuration parameters are successfully reset to default value
04
05RMAN> show all;
06
07RMAN configuration parameters for database with db_unique_name ORCL are:
08CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
09CONFIGURE BACKUP OPTIMIZATION OFF; # default
10CONFIGURE DEFAULT DEVICE TYPE TO DISK;
11CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
12CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
13CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
14CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
15CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
16CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
17CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
18CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
19CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
20CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'SBT_LIBRARY=/u02/admin/orcl/osbws/libosbws11.so';
21CONFIGURE MAXSETSIZE TO UNLIMITED; # default
22CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
23CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
24CONFIGURE COMPRESSION ALGORITHM 'BZIP2'; # default
25CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'TAPE';
26CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.1.0/db_1/dbs/snapcf_orcl.f'; # default
27
28RMAN>
Now we are set to default (for SBT) and configured RMAN for disk backup.

In next post we'll expolre additional RAN backup reporting.

No comments:

Post a Comment