Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

RMAN- registers and cancels the database in the recovery directory

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Create a recovery directory

1. Create the table space used to restore the catalog in the catalog database

SQL > create tablespace rman_ts datafile'c:\ oracle\ oradata\ cc\ rmants.ora' size 20m

The tablespace has been created.

2. Create a RMAN user in the catalog database and authorize it

SQL > create user rman identified by rman default tablespace rman_ts temporary tablespace temp

Quota unlimited on rmants

User has been created

SQL > grant recovery_catalog_owner,resource to rman

Grant succeeded.

3. Create a recovery directory in the catalog database

[oracle@node1 ~] $rman catalog rman/rman@ping

Recovery Manager: Release 10.2.0.1.0-Production on Wed Jan 7 09:52:13 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to recovery catalog database

RMAN > create catalog tablespace rman_ts

Recovery catalog created

4. Register the target database to the recovery directory

Target database: racdb

Restore directory: ping

[oracle@node1 ~] $rman target sys/1@racdb

Recovery Manager: Release 10.2.0.1.0-Production on Wed Jan 7 10:05:50 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to target database: RACDB (DBID=672464192)

RMAN > connect catalog rman/rman@ping

Connected to recovery catalog database

RMAN > register database

Database registered in recovery catalog

Starting full resync of recovery catalog

Full resync complete

Cancel the registration of the database

1. Log in to the recovery directory using the RMAN user in SQLPLUS

[oracle@node1 ~] $sqlplus / nolog

SQL*Plus: Release 10.2.0.1.0-Production on Wed Jan 7 10:50:06 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

SQL > conn rman/rman@ping

Connected.

2. Look up the registration record in the table DB

[oracle@node1 ~] $rman target sys/1@racdb

Recovery Manager: Release 10.2.0.1.0-Production on Wed Jan 7 10:49:03 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to target database: RACDB (DBID=672464192)

RMAN >

SQL > select db_key,db_id from db

DB_KEY DB_ID

--

1 672464192

DBID=DB.DB_ID

# # remember that users who use RMAN must log in, or the following error will appear

SQL > conn sys/sys@ping as sysdba

Connected.

SQL > select db_key,db_id from db

Select db_key,db_id from db

*

ERROR at line 1:

ORA-00942: table or view does not exist

3. Log out of the database

SQL > execute dbms_rcvcat.unregisterdatabase (1pm 672464192)

PL/SQL procedure successfully completed.

4. Verify logout action

[oracle@node1 ~] $rman

Recovery Manager: Release 10.2.0.1.0-Production on Wed Jan 7 11:02:16 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

RMAN > list backup

Using target database control file instead of recovery catalog

RMAN-00571: =

RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =

RMAN-00571: =

RMAN-03002: failure of list command at 01/07/2009 11:02:21

RMAN-06171: not connected to target database

RMAN >

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report