Subject: RMAN FAQ: Recovery Manager -- Frequently Asked Questions Type: FAQ Creation Date: 11-NOV-1999 ORACLE RECOVERY MANAGER (RMAN) ------------------------------ FREQUENTLY ASKED QUESTIONS -------------------------- 04-APR-2000 CONTENTS -- THE QUESTIONS ========================= Q: What is Recovery Manager (RMAN) and how do I get started? Q: Can I use RMAN with Oracle7? Q: What do I need to do to be able to make RMAN backups to tape? Q: How do I link RMan with ADSM on AIX? Q: A customer who is currently using EBU with a Media Manager would like to know whether the current interface library they have from their Media Manager will also work with Oracle8 Recovery Manager. Q: Where can I find out whether a Media Manager is certified for use with Recovery Manager or with EBU? Q: What is LSM (Legato Storage Manager) and why is it shipping with Oracle? Q: What Media Management Vendor's (MMV) can be used with Oracle8? Q: How does Legato Storage Manager (LSM) differ from Legato Networker? Q: Are there any functional differences between RMan for Oracle8 Enterprise Edition and Oracle8 (previously known as Workgroup Server)? Q: Are there any aids to assist migrating EBU on Oracle7 to RMan on Oracle8 ? Q: How do you re-link RMan on AIX with ADSM ? Q: How do I restore a backup onto Node B from a backup made on Node A? Q: How does RMAN perform corruption detection? Q: Is there any method to encrypt a Recovery Manager backup while the backup is being written out to tape? Q: The documentation states that CHANGE BACKUPSET/BACKUPPIECE requires a parameter . Which key do I have to use to delete or uncatalog obsolete entries? Q: Can I have my target database on a Sun box and the recovery catalog on a WinNT machine? Q: What is the recommended method for backing up the RMan repository? Q: Why do tablespaces not require hot backup mode or extra logging when using RMan for backups? Q: How many server sessions does RMan use? How can the RMan server sessions be identified? What is the purpose of each RMan server sessions? When are the RMan server sessions released? Q: When performing a tablespace point in time recovery, are constraints automatically disabled after recovery is complete? Q: Does RMan support NLS ? Q: Registering a database gives error messages including: ORA-04067: not executed, stored procedure "SYS.DBMS_BACKUP_RESTORE" does not exist Q: Can I still do manual backups using ALTER ... BEGIN / END commands and manually backup archivelogs? Q: What is the difference between incremental and full RMAN backups? Q: Customers complain that in 8.0.3, in Backup Manager, after entering id, password@connect_string, then clicking OK, nothing happens. THE ANSWERS =========== Q: What is Recovery Manager (RMAN) and how do I get started? A: See [NOTE:50875.1]. --- Q: Can I use RMan with Oracle7? A: No. RMan is intended for use with Oracle8 only. You must use the Enterprise Backup Utility (EBU, OBackup) with Oracle7. --- Q: What do I need to do to be able to make RMAN backups to tape? A: Oracle8 is not able to write directly to tape. As this is the case, Oracle has published an API specification which Media Management Vendor's who are members of Oracle's Backup Solutions Partner program have access to. Media Management Vendors (MMVs) then write an interface library which the Oracle8 server uses to write and read to and from tape. You need to have Media Management Server Software installed. You also need to have the interface library which is written by the Media Manager installed. Note that both RMAN and EBU use the same API specification to interface with Media Managers. --- Q: How do I link RMan with ADSM on AIX? A: See [NOTE:91576.1]. --- Q: A customer who is currently using EBU with a Media Manager would like to know whether the current interface library they have from their Media Manager will also work with Oracle8 Recovery Manager. A: Usually not. Although the same API specification is used by both EBU and RMan to write to tape, there are other considerations. Many MMVs have developed their own unique method for calling EBU and RMan - this is the method that many customer's use for scheduling jobs. If the MMV has not yet written code to support calling RMAN, it would not be possible to schedule RMan backup jobs using the MMVs GUI product. Media Manager's are currently in the process of customizing their GUIs to call RMAN and also certifying their products work with RMAN. The short answer is the RMAN should not be used with that Media Manager until the MMV has certified that their software works with RMan. Either contact your Media Manager, or check the RMan home page for updates on which MMVs have certified their products on which platforms: http://www.oracle.com/database/recovery/ --- Q: Where can I find out whether a Media Manager is certified for use with Recovery Manager or with EBU? A: The ultimate authority on this is the Media Management Vendor. They will have the most up-to-date information. However, for a guide, or for MMV contact information, please see the Backup and Recovery Solutions Home Page: http://www.oracle.com/database/recovery/ --- Q: What is LSM (Legato Storage Manager) and why is it shipping with Oracle? A: Legato Systems Inc. and Oracle Corporation announced that beginning with Oracle8 Release 8.0.4 (Oracle8 release 8.0.3 is currently in production) Oracle will include Legato Storage Manager (LSM) with the Oracle8 release. With Oracle8, backup and recovery is integrated with the Oracle Server. For backups that are written to tape, an MML (Media Management Layer) from a third party is required. This MML can be purchased from a number of Media Management Vendors (MMV) that participate in Oracle's Backup Solutions Program (BSP). BSP is part of Oracle's Business Alliance Program. Oracle8 release 8.0.4 will include an MML developed by Legato. Customers can choose whether or not to install this MML developed by Legato for use with Oracle8. Starting with Oracle8 release 8.0.4, customers will have a complete backup solution out of the box sold and supported by Oracle. --- Q: What Media Management Vendor's (MMV) can be used with Oracle8? A: There are about 30 MMVs who are members of Oracle's Backup Solutions Partners. Many of these partners are currently in the process of certifying their product with Oracle8 RMAN. To find out which MMVs are BSP partners, and to find out who has or will certify their products, see: http://www.oracle.com/database/recovery/ --- Q: How does Legato Storage Manager (LSM) differ from Legato Networker? A: The MML (Media Management Layer) bundled with Oracle8 is not the full version. The bundled version includes support for backups to a maximum of four directly connected tape devices. It does not support backups across a network or autochangers and is limited to a maximum of four streams to the four devices. --- Q: Are there any functional differences between RMan for Oracle8 Enterprise Edition and Oracle8 (previously known as Workgroup Server)? A: Oracle8 server does not include: o incremental backups o duplexed backups o parallelism (ability to allocate multiple streams) The above functionality is available and supported in the Oracle8 Enterprise Edition. --- Q: Are there any aids to assist migrating EBU on Oracle7 to RMan on Oracle8 ? A: See . There is no utility available to translate EBU scripts to RMAN. --- Q: How do you re-link RMAN on AIX with ADSM ? A: For Oracle 8.0.6 and Oracle8i, relinking is no longer necessary. For Oracle 8.0.4 and 8.0.5, use the following procedure for re-linking. 1) Install Oracle8. RMAN is automatically installed as a dependent product. 2) Install ADSM server. 3) Install ADSMConnect Agent for Oracle7. That's right, for Oracle7. The APIs for EBU and RMAN are identical. IBM does not have a new connect agent out for RMAN. They just re-certified the EBU interface. Check the IBM website for more information. http://index.storsys.ibm.com:80/adsm/pubs/version2/clients/ab50xmst.htm 4) Shutdown the database. 5) Link the media manager library with the Oracle8 server executable. This is for 8.0.4 and 8.0.5. (Relinking is not required for 8.0.6 or Oracle8i.) cd $ORACLE_HOME/rdbms/lib make -f ins_rdbms.mk ioracle LLIBMM=mylib LIBMM=mylib LLIBOBK=mylib Warning: In Oracle7, you linked the media manager library with the EBU executable. In Oracle8, the media manager library is linked with the server executable. This means that a 3rd party product's quirks can effect the database. 6) Now read the Connect Agent IUG you downloaded from the above URL. You must set the environmental variables as per the guide. If you do not the database will refuse to come up. This happened to my customer and both Oracle and IBM support were baffled. The parameters you need to pay attention to are: DSMI_CONFIG DSMI_DIR DSMI_LOG DSMO_AVG_SIZE DSMO_FS DSMO_NODE DSMO_OWNER DSMO_PSWDPATH 7) Startup the database. --- Q: How do I restore a backup onto Node B from a backup made on Node A? A: See [NOTE:73974.1]. --- Q: How does RMAN perform corruption detection? A: Corruption detection is actually performed by the Oracle server. RMAN does NOT perform the backup, but the Oracle server. RMAN just directs the server to backup a specified list of datafiles. During backup, the Oracle server detects certain types of corruptions. Many of the verification checks that are performed when a block is read into the buffer cache are also performed by a server process performing a backup. Some types of corruptions cannot be detected because the exact structure of table/index block distribution in the database object is unknown. Such information is unavailable to the server process performing the backup, and cannot be determined given that backups must be possible when the database is closed. If a block is detected as newly corrupted, it will be identified as such in the alert log and also in the database controlfile. You can view this information by querying the V$COPY_CORRUPTION or V$BACKUP_CORRUPTION views. If a block was already detected as corrupted by the server, then the block will not be identified in the same way as a newly corrupted block. --- Q: Is there any method to encrypt a Recovery Manager backup while the backup is being written out to tape? A: RMAN does not use an explicit encryption method, although the binary format of backup files offers some security. The Media Management Vendor may offer encryption because of the security issue revolves around physical security of the media. The encryption may be a transport bit filtering option. All Media Manager's support some degree of security regarding who can load and read their tapes. Note that the proprietary binary format of the backup output file from RMAN is not easily decipherable. To extract information from a datafile, you would have to have a copy of the same media management software and a copy of the media management backup catalog, and a in- depth knowledge of Oracle proprietary information. With the correct hardware, software, and knowledge it is theoretical possible. This security risk is not specific to the database. A customer has the same concerns with operating system backups of non-database files. --- Q: The documentation states that CHANGE BACKUPSET/BACKUPPIECE requires a parameter . Which key do I have to use to delete or uncatalog obsolete entries? A: The key for BACKUPSETs / COPYs is found using the list command: LIST BACKUPSET OF DATABASE; LIST COPY OF DATABASE; The column headed 'Key' lists keys to specify in the CHANGE...DELETE command. Alternatively, if it is a copy, you can specify the name of the copy: CHANGE DATAFILECOPY '/tmp/fred' DELETE; You can also use the piece name to delete a piece, but, if there is more than one piece in the set, the whole set will be deleted. --- Q: Can I have my target database on a Sun box and the recovery catalog on a WinNT machine? A: Yes. In fact, a configuration many customers may choose, is to create the Recovery Catalog in the same database that stores the Oracle Enterprise Manager repository. --- Q: What is the recommended method for backing up the RMan repository? A: Here is how we recommend deploying the Recovery Catalog: - It should be a separate database, not contained in any of the target databases whose backup data it contains. - High availability of the catalog can be achieved by any of the following techniques: - standy database - replication - maintaining two separate Recovery Catalog databases: one is kept in sync as it is used for everyday production operation, and the other is kept in sync manually, by periodically issuing the RESYNC CATALOG command. - Use RMAN to back up the Recovery Catalog database, but for these backups, start RMAN with the NOCATALOG option, so that the backup repository for the Recovery Catalog is its own control file. The CONTROL_FILE_RECORD_KEEP_TIME parameter should be set to a value which is high enough to store an adequate amount of historical backup data for the Recovery Catalog. - After each backup of the Recovery Catalog, use manual (NOT RMAN!) procedures to back up the Recovery Catalog controlfile, so that you can restore it if you ever need to restore the Recovery Catalog. --- Q: Why do tablespaces not require hot backup mode or extra logging when using RMan for backups? A: To understand why RMAN does not require extra logging or backup mode, you must first understand why those features are required for non-RMAN online backups. A non-RMAN online backup consists of a non-Oracle tool, such as cp or dd, backing up a datafile at the same time that DBWR is updating the file. We can't prevent the tool from reading a particular block at the exact same time that DBWR is updating that block. When that happens, the non-Oracle tool might read a block in a half-updated state, so that the block which is copied to the backup media might only have been updated in its first half, while the second half contains older data. This is called a "fractured block". If this backup needs to be restored later, and that block needs to be recovered, recovery will fail because that block is not usable. The 'alter tablespace begin backup' command is our solution for the fractured block problem. When a tablespace is in backup mode, and a change is made to a data block, instead of logging just the changed bytes to the redo log, we also log a copy of the entire block image before the change, so that we can reconstruct this block if media recovery finds that this block was fractured. That block image logging is what causes extra redo to be generated while files are in backup mode. The reason that RMAN does not require extra logging is that it guarantees that it will never back up a fractured block. We can make that guarantee because we know the format of Oracle data blocks, and we verify that each block that we read is complete before we copy it to the backup. If we read a fractured block, we read the block again to obtain a complete block before backing it up. non-Oracle tools are not able to do the same thing because they do not know how to verify the contents of an Oracle data block. Backup mode has another effect, which is to 'freeze' the checkpoint in the header of the file until the file is removed from backup mode. We do this because we cannot guarantee that the third-party backup tool will copy the file header prior to copying the data blocks. RMAN does not need to freeze the file header checkpoint because we know the order in which we will read the blocks, which enables us to capture a known good checkpoint for the file. --- Q: How many server sessions does RMan use? How can the RMan server sessions be identified? What is the purpose of each RMan server sessions? When are the RMan server sessions released? A: The number of RMAN server sessions can be calculated by the formula C+N+2, where: C is the number of allocated channels. These are used for backup and restore work. Server processes for channels will not disappear until rman exits. They will be re-used as necessary for further work. N is the number of distinct 'connect' options used on the allocate channel commands (or 1 if no connect options are used). One 'polling' session is opened at each node to query the status of the channels that are performing backup or restore work at this node. And the remaining 2 connections are: The 'default connection,' which performs action such as: -- recovery (application of redo) -- snapshot controlfile creation The connection to the recovery catalog (not used if RMAN is started with the NOCATALOG option). To check RMan processes, you would use normal operating system tools. Examples: On WinNT, the processes are easily found in the Task Manager. On Unix, you would use something like: $ ps -ef | grep rman osupport 12388 6982 0 13:25:11 pts/14 0:02 rman rcvcat $ ps -ef | grep 12388 osupport 12396 12388 0 13:25:53 ? 0:00 oraclePROD osupport 12395 12388 0 13:25:52 ? 0:00 oraclePROD --- Q: When performing a tablespace point in time recovery (TSPITR), are constraints automatically disabled after recovery is complete? A: No. Constraints that straddle the recovery set must be disabled before the TSPITR has begun. Constraints within the recovery set are in the same state as at the time the tablespaces are recovered to. --- Q: Does RMan support NLS ? A: Yes. For Oracle 8.0.4 onwards. There is a patch for 8.0.3 --- Q: Registering a database gives error messages including: ORA-04067: not executed, stored procedure "SYS.DBMS_BACKUP_RESTORE" does not exist A: An error message stack like the following indicates that CATPROC.SQL did NOT execute successfully on the target database, as required before attempting backups of that target database. RMAN-00569: ================error message stack follows================ RMAN-00600: internal error, arguments [10053] [1] [] [] [] RMAN-03008: error while performing automatic resync of recovery catalog RMAN-07004: unhandled exception during command execution on channel default RMAN-10032: unhandled exception during execution of job step 1: ORA-04067: not executed, stored procedure "SYS.DBMS_BACKUP_RESTORE" does not exist ORA-01403: no data found ORA-06512: at line 221 RMAN-10035: exception raised in RPC: ORA-04067: not executed, stored procedure "SYS.DBMS_BACKUP_RESTORE" does not exist RMAN-10031: ORA-4067 occurred during call to DBMS_BACKUP_RESTORE.GETPARM --- Q: Can I still do manual backups using ALTER ... BEGIN / END commands and manually backup archivelogs? A: Yes. ALTER ... BEGIN BACKUP; HOST ALTER ... END BACKUP; RECOVER ... All of the above manual backup and recovery commands are still available and supported when using RMan. For more information on these types of operating system backups, please refer to the Oracle8 Backup and Recovery Guide. --- Q: What is the difference between incremental and full RMAN backups? A: See [NOTE:69328.1]. --- Q: Customers complain that in 8.0.3, in Backup Manager, after entering id, password@connect_string, then clicking OK, nothing happens. A: The following procedure works to get OEM talking to a Sun box: 1. Install OEM on the PC (actually I installed Oracle8 ON NT) 2. Get the agent running on the sun box. Put all SIDs to be monitored in the oratab file (note that there was a bug in 8.0.3 that means the agent looks for the oratab file in a different location than that created by the installer [e.g. it looks in /etc/oratab if it was meant to be in /var/opt/oracle/oratab]. To get around this bug, I put a Unix link in the other location). Ensure the listener.ora and the tnsnames.ora files are all ok. Start the listener on the sun box: lsnrctl start Start the agent on the sun box: lsnrctl dbsnmp_start Check agent is running on the Sun box: lsnrctl dbsnmp_status 3. Create the OEM repository owner in a database somewhere, and grant that user connect,resource and dba (not sure if dba is needed or not). 4. Configure OEM Start OEM and give it the new username/password. If there is no repository there, it will prompt you to allow it to create one. At the end of the OEM repository creation, a wizard for discovering new services will appear. Type in the node names for all nodes you want to monitor. It will attempt to contact the agents on all the nodes to be monitored. Check to ensure the tnsnames.ora file on the PC is ok. 5. Once the discovery process is complete, configure all the perferred credentials: These are used by the agent when running jobs on the nodes. You should configure the credentials for a database user for that database (one with sysdba priviledge), and a node user (e.g. the 'oracle' executable set owner) for that node. You get to the preferred credentials screen by going to the file menu and clicking on the File menu and choosing preferences. The database user must have sysdba priv, or you will not be able to run backups (do this by granting sysdba priv to the user and ensure you are using password files on the target database e.g. remote_login_passwordfile=exclusive in the init.ora). Ensure the user specified in the preferred credentials for executing O/S jobs on the node has the correct environment set up (e.g. ENV vars such as ORACLE_HOME). Click on the databases icon in the console, and choose the database to backup/restore, then click on the backup manager. A few debugging tips. Start with the simplest test, and work up to the final configuration you are attempting to use: - See if you can connect to the target database by starting RMAN locally from the HP node. If you can't you will need to get this working first (see above regarding sysdba priv) This tests sqlnet and passwords and privileges. - Then try logging in to the target database using sqlplus or svrmgr30 from the PC. This tests SQL*Net on both sides. - If this also works, try initiating an O/S job (e.g. to do a dir) from the backup manager. This tests to see if the agent is working. - etc.. Note that the console must be running before starting Backup Manager. Also note that the OEM documentation is pretty good in instructions on installing and configuring OEM.