"It is wise to
apply the oil of refined politeness to the mechanisms of
friendship." Colette (1873 - 1954), The Pure and the Impure,
1932 |
Read
first then play the video:
DBA-VIDEO -RMAN
Managed user and repository (Oracle9i)
RMAN-Managed user and
repository
Introduction
You, as a DBA, are
responsible to create the RMAN repository and use the RMAN tool to
perform a backup and recovery of your organization"s database. Your
job"s responsibilities dictate that you should at least be informed
of the following basic fundamental subjects:
Creating the RMAN user
Generating the RMAN objects
Creating the Recovery
Manager Repository
Creating the RMAN
tablespace
Granting privileges to the
RMAN user
Granting the
RECOVERY_CATALOG_OWNER to the RMAN user
Using the RMAN RCVCAT
command
Using the DBA_OBJECTS
dictionary view
Using the DBMS_RCVCAT
package
Using the DBMS_RCVMAN
package
Commands:
CREATE TABLESPACE
CREATE USER
GRANT
DOS> rman RCVCAT
RMAN> CREATE CATALOG;
RMAN> exit;
Hands-on
In this exercise you will
learn how to create the RMAN user with all of its objects. You will
also learn how to create the Recover Manager Repository.
Now, connect to SQLPlus as the SYSTEM/MANAGER user.
SQL> CONNECT system/manager@dbs4rman AS
SYSDBA
Check RMAN user
Query all of the users in the DBS4RMAN database to verify whether
or not the RMAN user exists.
SQL> SELECT username
FROM dba_users
WHERE username like 'R%'
/
You should not get any RMAN user.
Create RMAN tablespace
Create a tablespace and
name it RMAN_TABLESPACE with a size of 50 Megabytes with the
AUTOEXTEND option.
SQL> CREATE TABLESPACE rman_tablespace
DATAFILE 'c:/newfolder/rman_tablespace_01.dbf' SIZE 50M
AUTOEXTEND ON
/
Create RMAN user
Now, create the RMAN user with it's password, PASSWORD, and its
default RMAN_TABLESPACE with unlimited quota space allocation. Then
grant the CONNECT, RECOVERY_CATALOG_OWNER, and SYSDBA privileges to
the RMAN user.
SQL> CREATE USER rman IDENTIFIED BY
password
DEFAULT TABLESPACE rman_tablespace
QUOTA UNLIMITED ON rman_tablespace
/
Grant Roles to RMAN
SQL> GRANT CONNECT,
RECOVERY_CATALOG_OWNER, SYSDBA
TO rman
/
Login to RMAN
Now, go to DOS (or any
operating system such as LINUX or UNIX) and run rman, and then connect
to rman as the rman user
DOS> rman RCVCAT rman/password@dbs4rman
Create RMAN Catalog
Once there, create the
Recovery Catalog Repository.
rman> CREATE CATALOG;
Exit from the Recovery Manager.
rman> exit;
Check RMAN packages
Check all off the packages that were created by the CREATE CATALOG
command.
SQL> SELECT object_name FROM dba_objects
WHERE owner = 'RMAN' AND
object_type = 'PACKAGE'
/
Now, you are ready to use Recovery Manager (RMAN). Note
that the DBMS_RCVCAT package is responsible for maintaining
information in the recovery catalog. The DBMS_RCVMAN package is used
for querying the recovery catalog or the control file.
"Honest differences
are often a healthy sign of progress." Mahatma Gandhi |
Questions:
Q: How do you create the
RMAN repository?
Q: How do you create the
RMAN user?
Q: How do you create the
RMAN objects?
Q: How do you create the
RMAN tablespace?
Q: What does the RMAN
RCVCAT command?
Q: What does the
DBMS_RCVCAT package?
Q: What does the
DBMS_RCVMAN package?
Q: What do the following
SQL and RMAN commands do?
SQL> CREATE TABLESPACE
rman_tablespace
DATAFILE 'c:/newfolder/rman_tablespace_01.dbf' SIZE 50M
AUTOEXTEND ON
/
SQL> CREATE USER rman
IDENTIFIED BY password
DEFAULT TABLESPACE rman_tablespace
QUOTA UNLIMITED ON rman_tablespace
/
SQL> GRANT CONNECT,
RECOVERY_CATALOG_OWNER, SYSDBA
TO rman
/
DOS> rman RCVCAT rman/password@dbs4rman
rman> CREATE CATALOG;
SQL> SELECT object_name FROM dba_objects
WHERE owner = 'RMAN'
and object_type = 'PACKAGE'
/
|