Database Reference
In-Depth Information
using an OS-authenticated account or that the username and password are correct. If OS authentication is working,
you should be able to log in to SQL*Plus as follows:
$ sqlplus / as sysdba
If you're using a password file, you can verify that the username and password are correct (and that the user has
sysdba privileges) by logging in as shown here:
$ sqlplus <username>/<password> as sysdba
If you receive an ORA-01031 error from attempting to log in to SQL*Plus, then either you aren't using an OS-
authenticated account or your username and password combination does not match what is stored in the password
file (for users attempting to connect with sys* privileges).
Once connected to RMAN, you can issue administrative commands, such as startup, shutdown, backup, restore,
and recover. For example, if you want to start and stop your database, you can do so from within RMAN as follows:
$ rman target /
RMAN> startup;
RMAN> shutdown immediate;
This saves you the inconvenience of having to jump back and forth between SQL*Plus and RMAN (when issuing
administrative commands).
rUNNING SQL COMMaNDS FrOM WIthIN rMaN
Starting with oracle 12c, you can run many SQL commands directly from the rMan command line. in prior
versions of oracle, when running certain SQL commands from within rMan, you had to specify the sql clause.
for example, say you wanted to run the alter system switch logfile command. prior to oracle 12c, you
would have to specify that command as shown:
RMAN> sql 'alter system switch logfile';
in oracle 12c, you can now run the SQL directly:
RMAN> alter system switch logfile;
this is a nice ease-of-use enhancement because it eliminates the need for additional clauses and quotes around
the command.
RMAN Architectural Decisions
If archiving is enabled for your database (see Chapter 2 for details on archiving), you can use RMAN out of the box to
run commands such as this to back up your entire target database:
$ rman target /
RMAN> backup database;
 
Search WWH ::




Custom Search