Catalog Maintenance   «Prev  Next»

Lesson 2 Starting RMAN with a recovery catalog
Objective Issue the command to start RMAN.

Starting RMAN with a Recovery Catalog

In this lesson, you will explore the command options to start RMAN with a recovery catalog. The examples in this lesson demonstrate command-line options. Backup Manager provides similar options. The basic syntax to start RMAN is:
RMAN target < string > [rcvcat  < string > | cmdfile < string > | 
msglog < string > | append | nocatalog]

You must have SYSDBA privilege to start RMAN. The entries in the brackets are optional. The <string>; entries are quoted using either single or double quotes or may be entered with no quotes. The table below identifies each of the <string>; options.

Argument Description of <string> Example of <string>
target The connect string to the target database with username/password. 'scott/tiger@prod'
rcvcat The connect string to the database containing the recovery catalog, including username/password. 'rman/rman@recv'
cmdfile The file containing input commands to operate RMAN in batch mode. 'C:\oracle8\database\backup.txt'
msglog RMAN commands and output will appear on the screen or in the log file specified with this argument. 'C:\oracle8\rman\output.txt'
append This keyword will cause the messages generated by RMAN to be appended to an existing log file. Without this keyword, the default is to overwrite the file.  
nocatalog This keyword allows you to start RMAN without specifying a recovery catalog. This type of operation is explained in the next lesson.  

Example 1
For the images that follow, you will be connecting to a local database and recovery catalog. The database is orc1, which you also use to store your recovery catalog. An alias, mydb, has been established for orc1. This has been done because the command string expects an alias for the recovery catalog. In the first example, you will connect to the target database and recovery catalog on the same command line. Your database is orc1, so use system/manager as the username/password combination. Then you need to connect to the recovery catalog with rman/rman as the username/password combination. In this instance, you use the alias mydb to specify a local database orc1.
rman80 target system/manager@mydb rcvcat rman/rman@mydb
rman80 target system/manager@mydb rcvcat rman/rman@mydb

Example 2
In the second example, you will connect to the recovery catalog and then connect to the database while in RMAN. Use the same connection information as in example 1.
rman80 rcvcat rman/rman@mydb
rman80 rcvcat rman/rman@mydb

Oracle RMAN Backup Recovery

What happens at startup

After typing in your RMAN command, the following activities occur:
  1. A user process is created for Recovery Manager.
  2. The user process creates two Oracle Server processes that connect to the target database:

1. A default process, which will execute the SQL commands, resynchronize the control file, and roll forward the redo logs
2. A polling process per instance
  1. A server process is created to access the recovery catalog.

As you start executing your backup commands, the Oracle Server processes that talk to your output device (disk or tape) will be created.
There are times where you may come across a difficult Oracle issue that really is a very .

RMAN Catalog Schema Separate Server

A recovery catalog is a schema stored in a database that tracks backups and stores scripts for use in RMAN backup and recovery scenarios.
The DBA suggests that the Enterprise Manager instance schema and RMAN catalog schema be placed in the same utility database on a server separate from the main servers. The RMAN schema requires approximately 16 megabyte per year per database backed up. While developing this module, I decided to move everything off one machine and onto another spare machine. I installed my Oracle 8.0.5 database and started experimenting with what is possible. Things seemed fine until I came to this particular lesson and tried to connect to my local database that also served as my Recovery Manager catalog. I was moving machines around and ended up putting my recovery catalog on my local machine. Please note that this is not the normal configuration for a
  1. database and
  2. recovery catalog.
If the database crashes, your recovery catalog crashes and is of no use to you.
After typing in the command that you see in my example:
 
C:\oracle8\bin>rman80 target system/manager@mydb  
rcvcat rman/rman@mydb

TNS error: Database could not be found.

I got a TNS error that my database could not be found. This perplexed me for a few weeks. In my NET80\ADMIN subdirectory are a few important files:
SQLNET.ORA - NAMES.DEFAULT_DOMAIN = world is an important entry.
TNSNAMES.ORA MYDB.WORLD

was configured to point to my machine and my local database, orc1.
LISTENER.ORA my LISTENER 

entries were set up correctly for my host and ports, my SID_LIST_LISTENER entries correctly identified my SID.
My database was up and running. When I checked my NT task list, the listener was up and running. After mulling this over for a few weeks, I ran the following from a DOS window:
C:\oracle8\bin\lsnrctl80 status

Check the following:
DOS check
	
(c) Copyright 1997 Oracle Corporation.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version 8.0.5.0.0 - Production
Start Date                06-OCT-00 09:38:24
Uptime                    0 days 1 hr. 50 min. 27 sec
Trace Level               OFF
Security                  OFF
SNMP                      OFF
Listener Log File         c:\oracle8\NET80\log\listener.log
The listener supports no services
The command completed successfully

This is an Oracle Listener status report obtained from the command prompt, which displays details such as the listener's alias, version, start date, uptime, and other settings. This particular listener is not supporting any services as indicated in the output.

Oracle 11g: Output from listener status command

In an Oracle 11g environment, the output from a listener status command would reflect some key differences compared to the previous Oracle 8.0.5.0.0 output.
Oracle 11g includes several enhancements, and its listener configuration may differ in terms of security features, trace levels, and the availability of services.
Here's how the output might change for Oracle 11g:
Differences for Oracle 11g:
  1. Version Information:
    • The version number would be updated to reflect the Oracle 11g listener version. For example:
      Version TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Production
      
  2. Listener Log File Path:
    • The log file path would reflect the Oracle 11g directory structure, which might be different based on the installation location. The path may look something like this:
      Listener Log File c:\oracle11g\diag\tnslsnr\hostname\listener\alert\log.xml
      
    • Oracle 11g introduced the Automatic Diagnostic Repository (ADR), which stores diagnostic data like log files in a structured manner. Therefore, the listener log file location is part of the ADR framework and follows a structured path.
  3. Security Settings:
    • Oracle 11g introduced enhanced security features. Therefore, the Security field may show additional security configurations such as:
      Security ON: Local OS Authentication
      
  4. Services Information:
    • Unlike the Oracle 8 version, where the listener supported no services, the Oracle 11g listener would typically show the services it supports (databases or applications). For example:
      Services Summary...
      Service "ORCL" has 1 instance(s).
      Instance "ORCL", status READY, has 1 handler(s) for this service...
      
  5. Trace Level:
    • The Trace Level might still be OFF by default, but tracing can be enhanced and managed more efficiently in Oracle 11g if required.
  6. SNMP:
    • The SNMP setting might be configured depending on whether SNMP support is enabled. If enabled, it could still appear similar to Oracle 8.
  7. ADR Reporting:
    • Oracle 11g integrates with ADR, so additional ADR diagnostic-related data might be included in the listener status output.

Example of Output in Oracle 11g:
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.4.0 - Production
Start Date                06-OCT-21 09:38:24
Uptime                    0 days 1 hr. 50 min. 27 sec
Trace Level               OFF
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Log File         c:\oracle11g\diag\tnslsnr\hostname\listener\alert\log.xml
Services Summary...
  Service "ORCL" has 1 instance(s).
  Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully

Summary: The major differences in an Oracle 11g environment would be:
  • Updated version number for the listener.
  • New log file path reflecting the Automatic Diagnostic Repository (ADR) framework.
  • Possible security settings enhancements, showing features like local OS authentication.
  • The listener will usually show supported services (if any).

As you can see, if your listener supports no services, you cannot listen. It is usually the obvious and simple problems that cause you the greatest confusion. Please be aware of your SQLNET.ORA, TNSNAMES.ORA, and LISTENER.ORA entries and check the obvious.
In the next lesson, you will execute RMAN without the recovery catalog.

SEMrush Software 2SEMrush Software Banner 2