[20151022]Create Recovery Catalog.txt

简介: [20151022]Create Recovery Catalog.txt --要测试rman catalog的一些我问题,做一个建立的记录(实际上以前做过): 1.
[20151022]Create Recovery Catalog.txt

--要测试rman catalog的一些我问题,做一个建立的记录(实际上以前做过):

1.CONNECT sys/password AS SYSDBA

CREATE TABLESPACE rman DATAFILE
  '/u01/app/oracle11g/oradata/test/rman01.dbf' SIZE 64M AUTOEXTEND ON NEXT 16M MAXSIZE UNLIMITED
LOGGING
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT MANUAL
FLASHBACK ON;

-- Create rman schema owner
CREATE USER rman IDENTIFIED BY rman
TEMPORARY TABLESPACE temp
DEFAULT TABLESPACE rman
QUOTA UNLIMITED ON rman;

GRANT connect, resource, recovery_catalog_owner TO rman;

2.Create the recovery catalog.

===以前建立过1次,版本太低,我升级到11.2.0.3.
$ rlwrap rman  catalog=rman/rman
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Oct 22 08:35:04 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
connected to recovery catalog database
PL/SQL package RMAN.DBMS_RCVCAT version 11.02.00.01 in RCVCAT database is not current
PL/SQL package RMAN.DBMS_RCVMAN version 11.02.00.01 in RCVCAT database is not current

RMAN> drop catalog ;
recovery catalog owner is RMAN
enter DROP CATALOG command again to confirm catalog removal

--需要再执行一次。
RMAN> drop catalog
recovery catalog dropped
===========

$ rman catalog=rman/rman
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Nov 30 11:56:59 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to recovery catalog database
RMAN> create catalog tablespace "RMAN";
recovery catalog created
RMAN>

3.Register Database

Each database to be backed up by RMAN must be registered with the catalog.

$ rman catalog=rman/rman@rman target=sys/btbtms
Recovery Manager: Release 11.2.0.3.0 - Production on Wed Nov 30 12:02:41 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: TEST (DBID=2060755746)
connected to recovery catalog database

RMAN> register database;

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

RMAN>

4.unregister database:
RMAN> unregister database;

database name is "TEST" and DBID is 2060755746

Do you really want to unregister the database (enter YES or NO)? YES
database unregistered from the recovery catalog

目录
相关文章
|
Oracle 关系型数据库 数据库
change backup ... for db_unique_name不同步到control file
change backup … for db_unique_name 可以改变备份集所属的db_unique_name,但oracle官方文档里面没有说会不会同步到db_unique_name对应的数据库的control file。我自己测试发现不会同步到control file。
ORA-09925: Unable to create audit trail file
ORA-09925: Unable to create audit trail file
151 0
|
SQL 监控 Go
backup, file manipulation operations (such as ALTER DATABASE ADD FILE) and encryption changes on a database must be serialized.
昨天在检查YourSQLDba备份时,发现有台数据库做备份时出现了下面错误信息,如下所示:   yMaint.ShrinkLog   Log Shrink   --  ============================================================...
1098 0
|
SQL 关系型数据库 Oracle
[20180211]current_schema与dblink.txt
[20180211]current_schema与dblink.txt --//有时候调优sql语句,经常在回话设在alter session set current_schema=scott,然后执行sql语句.
1118 0
|
Oracle 关系型数据库 数据库
[20150318]dg与db_create_file_dest参数
[20150318]dg与db_create_file_dest参数.txt --今天在例行检查时,发现dataguard上新建立的文件防的位置不对。 RMAN> report schema ; .
1061 0