Oracle OCP 1Z0-050(38题)解析

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/seagal890/article/details/82915798

Oracle OCP 1Z0-050(38题)解析

You are working on a CATDB database that contains an Oracle Database version 11.1 catalog schema owned by the user RCO11. The INST1 database contains an Oracle Database version 10.1 catalog schema owned by the user RCAT10.

You want the RMAN to import metadata for database IDs 1423241 and 1423242, registered in RCAT10, into the recovery catalog owned by RCO11.

You executed the following RMAN commands:

RMAN> CONNECT CATALOG rco11/password@catdb

RMAN> IMPORT CATALOG rcat10/oracle@inst1;

What happens when you execute the above commands? (Choose all that apply.)

A. They import metadata for all registered databases in the RCAT10 database.

B. They register all the RCAT10-catalog registered databases in the RCO11 catalog.

C. They overwrite all stored scripts in the RCO11 catalog with the same name as that in the RCAT10 catalog.

D. They deregister all databases registered in the RCAT10 catalog.

Answer: A,B,D

解析:

参考Oracle官方文档:

https://docs.oracle.com/cd/B28359_01/backup.111/b28273/rcmsynta026.htm#RCMRF198

Purpose

Use the IMPORT CATALOG command to import the metadata from one recovery catalog schema into a different catalog schema. If you created catalog schemas of different versions to store metadata for multiple target databases, then this command enables you to maintain a single catalog schema for all databases.

Prerequisites

RMAN must be connected to the destination recovery catalog, which is the catalog into which you want to import catalog data. This recovery catalog must not be a virtual private catalog.

No target database connection is needed in order to merge catalog schemas. Execute this command at the RMAN prompt or within the braces of a RUN command.

The version of the source recovery catalog schema must be equal to the current version of the RMAN executable. If the source schema is a lower version, then upgrade the catalog schema to the current version. If the source schema is a higher version, then retry the operation with a higher version RMAN executable.

Ensure that the same database is not registered in both the source recovery catalog schema and destination catalog schema. If a database is registered in both schemas, then UNREGISTER this database from source recovery catalog and execute the IMPORT command again.

Usage Notes

If the operation fails in the middle of the import, then the import is rolled back. Thus, a partial import is not permitted. The unregister operation is separate from the import. By default, the imported database IDs are unregistered from the source recovery catalog schema after a successful import.

Examples

Example 2-84 Importing Metadata for All Registered Databases

In this example, database inst1 contains a 10.2 catalog schema owned by user rcat, while database catdb contains an 11.1 catalog schema owned by user rco. RMAN imports metadata for all database IDs registered in rcat into the recovery catalog owned by rco. All target databases registered in rcat are unregistered.

RMAN> CONNECT CATALOG rco@catdb

recovery catalog database Password: password
connected to recovery catalog database
 
RMAN> IMPORT CATALOG rcat@prod;
 
Starting import catalog at 15-FEB-07
source recovery catalog database Password: password
connected to source recovery catalog database
import validation complete
database unregistered from the source recovery catalog
Finished import catalog at 15-FEB-07
Example 2-85 Importing Metadata for a Subset of Registered Databases

This example is a variation on Example 2-84. Instead of importing the entire recovery catalog, it imports only the metadata for the database with DBID 1618984270.

RMAN> CONNECT CATALOG rco@catdb

recovery catalog database Password: password
connected to recovery catalog database
 
RMAN> IMPORT CATALOG rcat@inst1 DBID=1618984270;
 
Starting import catalog at 15-FEB-07
source recovery catalog database Password: password
connected to source recovery catalog database
import validation complete
database unregistered from the source recovery catalog
Finished import catalog at 15-FEB-07
 

Semantics

Syntax Element Description
connectStringSpec Specifies the connection string for the source recovery catalog, which is the catalog whose metadata will be imported.
DBID integer Specifies the list of DBIDs for the databases whose metadata should be imported from the source catalog schema (see Example 2-85).

When not specified, RMAN merges metadata for all database IDs from the source catalog schema into the destination catalog schema. RMAN issues an error if the database whose metadata is merged is already registered in the recovery catalog schema.

DB_NAME database_name Specifies the list of databases whose metadata should be imported from the source catalog schema (see Example 2-85).

When not specified, RMAN merges metadata for all databases from the source catalog schema into the destination catalog schema. RMAN issues an error if the same DBID is registered in both recovery catalogs.

NO UNREGISTER Forces RMAN to keep imported database IDs in the source catalog schema. By default, the imported database IDs are unregistered from source recovery catalog schema.

猜你喜欢

转载自blog.csdn.net/seagal890/article/details/82915798
今日推荐