Database Reference
In-Depth Information
Typically you will connect to the target database locally and connect to the auxiliary
database via Oracle Net, but this is not a requirement. Here is an example of connecting to
RMAN to perform a database duplication. In this example, we are connecting to a local
target database called orcl . We use the auxiliary command-line parameter to indicate that
we are connecting to an auxiliary database. In this case, it is the database pointed to by the
net service name of mydb .
set oracle_sid=orcl
rman target=/ auxiliary=sys/password@mydb
You could also use these variations to connect with RMAN for a database duplication:
rman target=sys/robert auxiliary=sys/password@mydb
rman target=sys/robert@orcl auxiliary=sys/password@mydb
You might have noticed that we don't use SYSDBA when connecting to RMAN.
That is because all connections from RMAN to any database are always with
SYSDBA privileges.
The RMAN DUPLICATE DATABASE Command
The RMAN DUPLICATE DATABASE command is used when performing either mode of data-
base duplication. The command comes with a number of different options that give you the
ability to complete the following operations:
Copy the source spfile to the auxiliary instance.
Change specific parameters when copying a source spfile to the auxiliary instance.
Indicate the location that the duplicated files should be copied to using the database
filename conversion options DB_FILE_NAME_CONVERT and LOG_FILE_NAME_CONVERT .
Create a standby database environment on the auxiliary instance.
Open the duplicated database in a restricted session.
Use the password file from the target database to create the password file on the auxiliary
instance (active database duplication only).
Skip read-only tablespaces.
Include or exclude specific tablespaces.
Restore to a specific restore point or use the UNTIL clause to restore to a specific time,
SCN, or log sequence number (backup-based database duplication only).
During the duplication process, RMAN will automatically create the needed tempfiles
for any temporary tablespaces. Here is an example of the RMAN DUPLICATE command:
Duplicate target database to neworcl nofilenamecheck spfile;
Search WWH ::




Custom Search