建立catalog並註冊資料庫

cnhtm發表於2009-07-06

一、環境說明:

1、catalog資料庫

sid:catalog

username:rman

password:rman

2、備份資料庫

sid:orcl

二、操作步驟

1、在catalog資料庫上建立使用者

]> export ORACLE_SID=catalog
]> sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 27 06:10:11 2009

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

> create user rman identified by rman;

User created.

> alter user rman quota unlimited on users;

User altered.

> grant recovery_catalog_owner to rman;

Grant succeeded.

> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

2、編輯tnsnames.ora,增加catalog的tns

]> cd $ORACLE_HOME/network/admin
]> ls
samples shrept.lst sqlnet.ora tnsnames.ora
]> vi tnsnames.ora
catalog =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(SID = catalog)
)
)

orcl =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
)
(SID = orcl)
)
)

]> tnsping catalog

TNS Ping Utility for Linux: Version 10.2.0.1.0 - Production on 27-MAR-2009 06:12:00

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

Used parameter files:
/oracle/app/10g/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))) (CONNECT_DATA = (SID = catalog)))
OK (10 msec)

3、建立catalog,並註冊資料庫

]> export ORACLE_SID=orcl
]> rman target / catalog

Recovery Manager: Release 10.2.0.1.0 - Production on Fri Mar 27 06:12:35 2009

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

connected to target database: ORCL (DBID=1210313093)
connected to recovery catalog database

RMAN> create catalog tablespace users;

recovery catalog created

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN> exit


Recovery Manager complete.

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22049049/viewspace-1023818/,如需轉載,請註明出處,否則將追究法律責任。

相關文章