Database Reference
In-Depth Information
Helpful, isn't it?
Oracle Database 12 c has changed how SQL statements are run (though the old SQL com-
mand is still there for backward compatibility). Now you can just run the SQL command
from the RMAN command line unaltered, and see the results. Here is an example:
RMAN> select name from v$database;
NAME
---------------
ORCL12C
Now, that is much more helpful. You can issue pretty much any SQL, DML, or DDL
command from the RMAN prompt now. Many SQL commands are supported from the
RMAN prompt, but there are some that are not supported. More information on what SQL
commands can be used is found in the Oracle Backup and Recovery Reference 1 2c Release 1
(E17631-15) topic.
By default, the SQL command will be executed on the target database. You can also
execute SQL commands on the recovery catalog database or through a specific assigned
channel. In these cases, you need to prefix the command with the RMAN SQL command
and then use the catalog or channel_id to indicate where the SQL statement should be
executed. Note that you don't need to use single quotes as was required in earlier versions
of the Oracle Database.
For example, this executes the SQL command on the catalog database.
RMAN> select catalog name from v$database;
NAME
---------------
OCAT
You can now also execute anonymous PL/SQL blocks from the RMAN command
line parameter. PL/SQL blocks from RMAN do not allow bind variables and no results
are returned.
Configuring RMAN
RMAN will work out of the box without any configuration. Unfortunately, this is gen-
erally not a good idea. RMAN tends to throw things into ORACLE_HOME if you have not
configured the database and RMAN correctly. In this section, we will address configuring
RMAN correctly.
In the following sections, we will introduce you to the Fast Recovery Area (FRA) in
RMAN. We will then address RMAN persistent configuration settings to allow for stream-
lined backups followed by using nonpersistent settings when required. Finally, we will
cover configuring RMAN for its first use.
Search WWH ::




Custom Search