Sie sind auf Seite 1von 7

You must set the ORACLE_SID environment variable, specifying the system identifier (SID) for

the database.

% ORACLE_SID=prod; export ORACLE_SID

set ORACLE_SID=ime


ili ORACLE_SID=ime //sa foruma


You must be a member of the OSDBA operating system group to connect with
the SYSDBA privilege or the OSBACKUPDBA operating system group to connect with
the SYSBACKUP privilege.
On UNIX and Linux, the OSDBA group is typically named dba, and the OSBACKUPDBA group is
typically named backupdba.

how to connect to a target database with operating system authentication.

Example 4-1 OS Authentication with the SYSDBA Privilege - Explicit

% rman target '"/ as sysdba"'

Example 4-2 OS Authentication with the SYSBACKUP Privilege - Explicit

% rman target '"/ as sysbackup"'

Example 4-3 OS Authentication with the SYSDBA Privilege - Implicit

rman target /

If neither AS SYSBACKUP nor AS SYSDBA is specified in the connection string, then the default
used is AS SYSDBA.

To connect with operating system authentication, ensure that you are logged in
to the database host as a user who is in the OSBACKUPDBA group (typically
the backupdba group on UNIX and Linux systems), and enter the following

rman target /

When you do not explicitly specify SYSDBA or SYSBACKUP, you are connected
to the target database with the SYSDBA privilege.

Start RMAN
RMAN executable is automatically installed with the database and is typically located in the
same directory as the other database executables. For example, the RMAN client on Linux is
located in $ORACLE_HOME/bin

Start the RMAN executable at the operating system command line without specifying any
connection options, as in the following example:
% rman

tart the RMAN executable at the operating system command line, as in the following
% rman TARGET /
% rman TARGET sbu@prod NOCATALOG

To quit RMAN, enter EXIT or QUIT at the RMAN prompt:


Making Database Connections with RMAN

Example 4-7 Connecting With OS Authentication Implicit

RMAN> connect target /

Because no system privilege is specified,ASSYSDBA is assumed.

Example 4-8 Connecting with OS Authentication - Explicit
RMAN> connect target "/ as sysdba"

When including a system privilege, the enclosing quotation marks (single or double) are
Example 4-9 Connecting with Password File Authentication
RMAN> connect target "sbu@prod AS SYSBACKUP"

target database Password: password

connected to target database: PROD (DBID=39525561)

Example 4-10 Connecting to Target and a Recovery Catalog

In this example, the target connection uses operating system authentication, and the
recovery catalog database connection uses a net service name and password file
authentication. The recovery catalog owner is user rco. RMAN prompts for the password of the
recovery catalog user.
RMAN> connect target /
RMAN> connect catalog rco@catdb

recovery catalog database Password: password

connected to recovery catalog database

The NOCATALOG Option indicates that a recovery catalog is not used in the session.

This example illustrates a connection to a target database that uses a net service name and
password file authentication. RMAN prompts for the password.
% rman TARGET sbu@prod NOCATALOG

This example illustrates a connection that uses Oracle Net authentication for the target and
recovery catalog databases. In both cases RMAN prompts for a password.
% rman TARGET sbu@prod CATALOG rco@catdb

Connecting to Target and Auxiliary Databases from the RMAN Prompt

% rman

jos ima nacina za konekciju...

Specifying the Location of RMAN Output

By default, RMAN writes command output to standard output. To redirect output to a log file,
enter the LOG parameter on the command line when you start RMAN, as in the following
% rman LOG /tmp/rman.log

RMAN-Created Image Copies

To create image copies and have them recorded in the RMAN repository, you run
the RMAN BACKUP AS COPY command. Alternatively, you can configure the default backup
type for disk as image copies. A database server session is used to create the copy. The
server session also performs actions such as validating the blocks in the file and recording the
image copy in the RMAN repository.
As with backup pieces, FORMAT variables are used to specify the names of image copies. The
default format %U, which was explained in "About File Names for RMAN Backup Pieces", is
defined differently for image copies. The following example shows the name for data
file 2 generated by %U:

When creating image copies, you can also name the output copies with
the DB_FILE_NAME_CONVERT parameter of theBACKUP command. This parameter works
identically to the DB_FILE_NAME_CONVERT initialization parameter. Pairs of file name prefixes
are provided to change the names of the output files. If a file is not converted by any of the
pairs, then RMAN uses the FORMAT specification: if no FORMAT is specified, then RMAN uses
the default format %U.

Example 8-1 Specifying File Names with DB_FILE_NAME_CONVERT

This example copies the data files whose file name is prefixed with /maindisk/oradata/users so
that they are prefixed with /backups/users_ts.
DB_FILE_NAME_CONVERT ('/maindisk/oradata/users',

Forum :

down voteaccept ed

You do not need to take a backup at your base time. Just enable flashback database, create a guaranteed
restore point, run your tests and flashback to the previously created restore point.
The steps for this would be:
1. Startup the instance in mount mode.
startup force mount;
2. Create the restore point.
create restore point before_test guarantee flashback database;
3. Open the database.
alter database open;
4. Run your tests.
5. Shutdown and mount the instance.
shutdown immediate; startup mount;
6. Flashback to the restore point.
flashback database to restore point before_test;
7. Open the database.
alter database open;