oracle all catalog,创建catalog并注册数据库

一、环境说明:

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@]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值