Oracle RMAN 11g Backup and Recovery (73 page)

BOOK: Oracle RMAN 11g Backup and Recovery
11.99Mb size Format: txt, pdf, ePub

TAG20060722T212604

Handle: 02horjvc 1 1 Media:

List of Datafiles in backup set 1

File LV Type Ckp SCN Ckp Time Name

---- -- ---- ---------- --------- ----

4 Full 8772169 26-JAN-2010

+DATA/rac/datafile/users.259.582982545

BS Key Type LV Size Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

2 Full 1.24G SBT TAPE 00:03:24 26-JAN-2010

BP Key: 2 Status: AVAILABLE Compressed: NO Tag:

TAG20060722T213140

Handle: 03hork9s 1 1 Media:

List of Datafiles in backup set 2

File LV Type Ckp SCN Ckp Time Name

---- -- ---- ---------- --------- ----

1 Full 8772449 26-JAN-2010

+DATA/rac/datafile/system.256.582982545

2 Full 8772449 26-JAN-2010

+DATA/rac/datafile/undotbs1.258.582982545

3 Full 8772449 26-JAN-2010

+DATA/rac/datafile/sysaux.257.582982545

4 Full 8772449 26-JAN-2010

+DATA/rac/datafile/users.259.582982545

5 Full 8772449 26-JAN-2010

+DATA/rac/datafile/example.264.582982703

6 Full 8772449 26-JAN-2010

+DATA/rac/datafile/undotbs2.265.582982943

7 Full 8772449 26-JAN-2010

+DATA/rac/datafile/undotbs3.266.582983003

BS Key Type LV Size Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

3 Full 14.75M SBT TAPE 00:00:05 26-JAN-2010

BP Key: 3 Status: AVAILABLE Compressed: NO Tag:

TAG20060722T213140

Handle: 04horkga 1 1 Media:

Control File Included: Ckp SCN: 8772600 Ckp time: 26-JAN-2010

SPFILE Included: Modification time: 26-JAN-2010

RMAN>

202
Part II: Setup Principles and Practices

FIGURE 9-3
Querying storage pool volumes

And finally, you can see how much disk space the backups are using in the storage pool by looking at the properties of the storage pool volumes, as shown in Figure 9-3. You access this page by clicking the ORACLEPOOL storage pool link in Figure 9-4, then clicking the Volumes link in Figure 9-5.

FIGURE 9-4
Displaying storage pools and capacity

Chapter 9: RMAN and Tivoli Storage Manager
203

FIGURE 9-5
Client displaying storage pool volumes

What’s in a Name?

TDPO_NODE can be called almost anything. In environments with many Oracle databases that are using TSM and TDPO for backups, TDPO_NAME could be the root of why backups and restores aren’t working. If backups were done with a TDPO_NODE of oc1_oracle and then a new TDPO_NODE, oc2_oracle, were created, and if the tdpo file were changed to use the new TDPO_NAME, RMAN would be unable to access any backups taken under oc1_

oracle until the TDPO_NODE were changed in the tdpo file to oc1_oracle. Another common problem is that the password file for the TDPO_NODE that is being used isn’t on the database server. This will cause both backups and restore operations to fail.

204
Part II: Setup Principles and Practices

Default Channels

While every DBA should know how to manually allocate channels, it can be a lot of error-prone typing, and if you have many databases, you may not know which tdpo file to use. By setting one parameter, you can back up a database with a simple backup database command with no manual channel allocation. Running a
show all
command from the RMAN> prompt will show the various RMAN options that are configured. To back up to TSM with automatic channel allocation, we are interested in only two options: CONFIGURE DEFAULT DEVICE TYPE TO ‘SBT_TAPE’ and CONFIGURE CHANNEL DEVICE TYPE ‘SBT_TAPE’ PARMS.

By running the following commands from the RMAN prompt, we can set default channels: RMAN> CONFIGURE DEFAULT DEVICE TYPE TO 'SBT TAPE';

RMAN> CONFIGURE CHANNEL DEVICE TYPE 'SBT TAPE' PARMS

ENV (TDPO OPTFILE /opt/tivoli/tsm/client/oracle/bin/tdpo.opt)' FORMAT %U'; After the configuration commands have been run, backups are even easier: RMAN> backup database;

Deleting Database Backups

One of the main advantages of using RMAN is a common interface in deleting backups. It doesn’t matter if the backups are a disk or tape, the same commands are used to delete expired backups.

Even though the commands to delete backups are the same when using TSM and TDPO, there are times when additional cleanup may be needed. When you delete backups, you will notice the backups are deleted very quickly regardless of the size of the backup. When RMAN tells TSM to delete backup files, TSM does not immediately delete the files since the tape may not be available at the moment, or all the tape drives could be busy. So TSM marks the files to be deleted and returns a success code to RMAN. The TSM administrator will run a purge process that actually deletes the files. If you are using a catalog with the tdposync tool provided by TSM, it is possible to compare what the RMAN catalog shows as deleted and what TSM has actually deleted. To launch tdposync from the default location, using the example tdpo file run /opt/tivoli/tsm/client/oracle/bin/

tdposync SYNCDB -TDPOfile=/opt/tivoli/tsm/client/oracle/bin/tdpo.opt. You must have the tdpo file that was used to take the backups for the comparison to work. After launching, tdposync will ask for a username, password, and a connection string to the RMAN catalog. If more than one RMAN catalog holds backup records, add the parameter -NUMCATALOGS=number. If any discrepancies are found after the comparison, tdposync will provide a list and ask for confirmation before deleting the files from TSM.

Troubleshooting Common Backup Scenarios

Backing up an Oracle database using TSM involves four parts: RMAN, Oracle, O/S, and TSM—

each of which can fail and report errors. When you use the RMAN console at first, it can be difficult to know which of the four parts is reporting the error, since errors from all sources are returned to the RMAN console. In the next example, an O/S, Oracle, and RMAN error returned after a simple backup database was issued.

RMAN> backup database;

RMAN-00571:

RMAN-00569:

ERROR MESSAGE STACK FOLLOWS

Chapter 9: RMAN and Tivoli Storage Manager
205

RMAN-00571:

RMAN-03002: failure of backup command at 07/17/2009 10:34:31

RMAN-03014: implicit resync of recovery catalog failed

RMAN-06403: could not obtain a fully authorized session

ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

Linux-x86 64 Error: 2: No such file or directory

RMAN>

It is usually best to take a bottom-up approach when reading the error messages.

6. RMAN-03002: failure of backup command

5. RMAN-03014: implicit resync of recovery catalog failed

4. RMAN-06403: could not obtain a fully authorized session

3. ORA-01034: ORACLE not available

2. ORA-27101: shared memory realm does not exist

1. Linux-x86_64 Error: 2: No such file or directory

Other books

London from My Windows by Mary Carter
Working Girl Blues by Hazel Dickens
Seduced by a Rogue by Amanda Scott
A Flight of Golden Wings by Beryl Matthews
McCrory's Lady by Henke, Shirl Henke
Bayou Judgment by Robin Caroll