当前位置: 首页 > 工具软件 > Catlog > 使用案例 >

catlog 配置

常博裕
2023-12-01

Catlog的作用是将备份记录在catlog服务器,防止记录丢失

源库(172.16.100.100)

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount;

ORACLE instance started.

 

Total System Global Area  839282688 bytes

Fixed Size            2217992 bytes

Variable Size          503318520 bytes

Database Buffers      331350016 bytes

Redo Buffers            2396160 bytes

Database mounted.

SQL> alter database archivelog;

 

Database altered.

 

SQL> alter database open;

 

Database altered.

 

 

SQL> create tablespace rmanuserstbs datafile '/u01/app/oracle/oradata/orcl/rmanuserstbs' size 100m;

 

Tablespace created.

 

SQL> create temporary tablespace tmp tempfile
				'/u01/app/oracle/oradata/orcl/tmp.dbf' size 10m;

 

Tablespace created.

 

SQL> create user rmanadmin identified by rmanadmin default tablespace rmanuserstbs temporary tablespace tmp;

 

User created.

 

SQL> grant connect,resource,recovery_catalog_owner to rmanadmin;

 

Grant succeeded.

 

SQL> alter system set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.100.100)(PORT=1521)))';

 

 

 

 

 

备份库(172.16.100.200)

 

[oracle@localhost admin]$ pwd
				

/u01/app/oracle/product/11.2.0.1/network/admin

[oracle@localhost admin]$ cat tnsnames.ora 

# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0.1/network/admin/tnsnames.ora

# Generated by Oracle configuration tools.

 

ORCL_100 =
				

  (DESCRIPTION =
				

    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.100.100)(PORT = 1521))

    (CONNECT_DATA =
				

      (SERVER = DEDICATED)

      (SERVICE_NAME = orcl.localdomain)

    )

  )

 

 

[oracle@localhost admin]$ rman target sys/oracle@ORCL_100 catalog rmanadmin/rmanadmin@ORCL_100

RMAN> create catalog tablespace rmanuserstbs;(在100.100已创建)

 

recovery catalog created

 

RMAN> register database;

 

database registered in recovery catalog

starting full resync of recovery catalog

full resync complete

 

 

之后就可以查看源库的信息

 

RMAN> list backup;

 

 

List of Backup Sets

===================
				

 

 

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

83      Full    428.42M    DISK        00:01:48
				30-AUG-15
					

        BP Key: 89   Status: AVAILABLE  Compressed: NO  Tag: TAG20150830T142843

        Piece Name: /u01/backup2/0cqftdkr_1_1

  List of Datafiles in backup set 83
						

  File LV Type Ckp SCN    Ckp Time  Name


				---- -- ---- ---------- --------- ----


				2       Full 1100783
				30-AUG-15 /u01/app/oracle/oradata/orcl/sysaux01.dbf


					3       Full 1100783
					30-AUG-15 /u01/app/oracle/oradata/orcl/undotbs01.dbf


					4       Full 1100783
					30-AUG-15 /u01/app/oracle/oradata/orcl/users01.dbf

 

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ ---------------

84      Full    662.33M    DISK        00:03:12
				30-AUG-15
					

        BP Key: 90   Status: AVAILABLE  Compressed: NO  Tag: TAG20150830T142843

        Piece Name: /u01/backup/0bqftdkr_1_1

  List of Datafiles in backup set 84
						

  File LV Type Ckp SCN    Ckp Time  Name


				---- -- ---- ---------- --------- ----


				1       Full 1100782
				30-AUG-15 /u01/app/oracle/oradata/orcl/system01.dbf


					5       Full 1100782
					30-AUG-15 /u01/app/oracle/oradata/orcl/example01.dbf
			

  

转载于:https://www.cnblogs.com/houzhiqing/p/4771193.html

 类似资料: