Lab-09-Creating A Recovery Catalog

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Oracle Internal & Oracle Academy Use Only

Practices for Lesson 9:


Creating a Recovery Catalog
Practices for Lesson 9: Overview

Overview
In these practices, you will perform the following one-time setup tasks:
 Create a recovery catalog owner.
 Create a recovery catalog.

Oracle Internal & Oracle Academy Use Only

Copyright © 2022, Oracle and/or its affiliates.

2 Practices for Lesson 9: Creating a Recovery Catalog


Practice 9-1: Creating a Recovery Catalog Owner

Overview
In this practice, you create a user and grant appropriate privileges.

Timing Estimate
It should take approximately 10 minutes to complete this practice.

Tasks
1. Open a terminal window. Use oraenv again to set the environment variables for the
RCATCDB database.
$ . oraenv

Oracle Internal & Oracle Academy Use Only


ORACLE_SID = [orclcdb] ? rcatcdb
The Oracle base remains unchanged with value /u01/app/oracle
$
2. Create a tablespace named RCATTBS for the recovery catalog.
a. Use SQL*Plus to log in to the RCATPDB PDB as the SYS user with the SYSDBA role.
Refer to the Course Practice Environment: Security Credentials document for the
correct password.
$ sqlplus sys@rcatpdb as sysdba

Enter password: ********

SQL>
b. Verify that the RCATPDB PDB is open. If it is not, open the RCATPDB PDB using the
ALTER DATABASE OPEN command.
SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED


---------- ---------------------- ---- ---------- ----------
3 RCATPDB READ WRITE NO
SQL>
c. Create the RCATTBS tablespace with a single 15 MB datafile.
SQL> CREATE TABLESPACE rcattbs DATAFILE
'/u01/app/oracle/oradata/RCATCDB/rcatpdb/rcat01.dbf' SIZE 15M
REUSE;

Tablespace created.

Copyright © 2022, Oracle and/or its affiliates.

Practices for Lesson 9: Creating a Recovery Catalog 3


SQL>
3. Create a user that will own the recovery catalog data. Name the user RCATOWNER. The
default tablespace should be the RCATTBS tablespace, and the user should have unlimited
quota on that tablespace. Refer to the Course Practice Environment: Security Credentials
document for the correct password to replace <password>.
SQL> CREATE USER rcatowner IDENTIFIED BY <password> DEFAULT
TABLESPACE rcattbs QUOTA unlimited on rcattbs;

User created.

SQL>
4. Grant the RECOVERY_CATALOG_OWNER role to the RCATOWNER user and exit from

Oracle Internal & Oracle Academy Use Only


SQL*Plus.
SQL> GRANT recovery_catalog_owner TO rcatowner;

Grant succeeded.

SQL> exit

$
5. Close the terminal window.

Copyright © 2022, Oracle and/or its affiliates.

2 Practices for Lesson 9: Creating a Recovery Catalog


Practice 9-2: Creating the Recovery Catalog

Overview
In this practice, you use RMAN to create the recovery catalog in the RCATPDB pluggable
database.

Assumptions
You have completed Practice 9-1. If you skipped the required practice, complete the Catchup
Step in a terminal window.

Timing Estimate
It should take approximately 5 minutes to complete this practice.

Oracle Internal & Oracle Academy Use Only


Tasks
1. (Catchup Step) If you skipped Practice 9-1, run the prep09-02.sh script in a terminal
window and then proceed to step 2.
$ /home/oracle/labs/admin/prep09-02.sh
...
$
2. Open a terminal window and connect to the recovery catalog database by using RMAN.
Log in as the recovery catalog owner you created in the previous practice. Refer to the
Course Practice Environment: Security Credentials document for the correct password.
$ rman catalog rcatowner@rcatpdb

recovery catalog database Password: *********
connected to recovery catalog database

RMAN>
3. Create the recovery catalog. This command may take a few minutes to complete. When
you see the RMAN> prompt, exit the RMAN session.
RMAN> create catalog;

recovery catalog created

RMAN> exit

$
4. Close all terminal windows.

Copyright © 2022, Oracle and/or its affiliates.

Practices for Lesson 9: Creating a Recovery Catalog 3

You might also like