Bugra Canbakal's Oracle Blog

  • Home
  • Contact
  • SITE MAP
You are here: Home / Oracle / Installation of Oracle RMAN Catalog

Installation of Oracle RMAN Catalog

07:52 AM By Bugra Canbakal 5 Comments

1.PURPOSE AND SCOPE

When using RMAN for taking backup, database records to backup informations to controlfile. Oracle suggest to use RMAN catalog option because of probability to losing controlfile.With help of RMAN catalog we can save rman informations at catalog database.Also it can use for saving rman scripts and information about rman backups.For to use this product we also need another database which act like a catalog database.

In this artichle i am going to explain how to install oracle RMAN catalog,how to register your database to catalog database and how to control backups.

2.PRACTICE

2.1. Information about database.

192.168.166.128 sourcesrv (Production database)
192.168.166.129 targetsrv (Oracle RMAN catalog database)

2.2. I am creating catalog user at targetsrv database and grant him some necessery privilages.

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[oracle@targetsrv ~]$ sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.2.0 Production on Thu Jun 28 14:10:05 2012
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> create user catalog identified by catalog;
 
User created.
 
SQL> grant recovery_catalog_owner to catalog;
 
Grant succeeded.
 
SQL> alter user catalog quota unlimited on users;
 
User altered.

2.3. At targetsrv database  we need to connect rman using catalog user.And we will create catalog.

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
[oracle@targetsrv ~]$ rman
 
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jun 28 14:13:23 2012
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
RMAN> connect catalog catalog/catalog@TARGET
 
connected to recovery catalog database
 
RMAN> create catalog
 
recovery catalog created

2.4. Now we need to register our source  database to TARGET database using rman.

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
[oracle@sourcesrv ~]$ rman
 
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jun 28 14:19:32 2012
 
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
RMAN> connect target sys/sys@SOURCE
 
connected to target database: SOURCE (DBID=2888707862)
 
RMAN> connect catalog catalog/catalog@TARGET
 
connected to recovery catalog database
 
RMAN> register database;
 
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

2.5. We can use “report schema” command to check is registration of database succeed or not.

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
RMAN> report schema;
 
Report of database schema for database with db_unique_name SOURCE
 
List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    700      SYSTEM               YES     /oracle/app/oradata/source/system01.dbf
2    510      SYSAUX               NO      /oracle/app/oradata/source/sysaux01.dbf
3    60       UNDOTBS1             YES     /oracle/app/oradata/source/undotbs01.dbf
4    10       USERS                NO      /oracle/app/oradata/source/users01.dbf
5    313      EXAMPLE              NO      /oracle/app/oradata/source/example01.dbf
 
List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    20       TEMP                 32767       /oracle/app/oradata/source/temp01.dbf

2.6. I didnt take any backup at source database, lets go target database and check catalog.

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
[oracle@targetsrv ~]$ sqlplus catalog/catalog
SQL*Plus: Release 11.2.0.2.0 Production on Thu Jun 28 14:40:06 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
SQL> SELECT BS_KEY, BACKUP_TYPE, COMPLETION_TIME
FROM   RC_DATABASE_INCARNATION i, RC_BACKUP_SET b
WHERE  i.DB_KEY = 1
AND    i.DB_KEY = b.DB_KEY
AND    i.CURRENT_INCARNATION = 'YES';  2    3    4    5  
 
no rows selected

2.7. Nice there is no record about backups so i am starting backup at source database.

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[oracle@sourcesrv ~]$ rman
 
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jun 28 14:19:32 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
 
RMAN> connect target sys/sys@SOURCE
connected to target database: SOURCE (DBID=2888707862)
 
RMAN> connect catalog catalog/catalog@TARGET
connected to recovery catalog database
 
RMAN> backup database;
 
Starting backup at 28-JUN-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=40 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/oracle/app/oradata/source/system01.dbf
input datafile file number=00002 name=/oracle/app/oradata/source/sysaux01.dbf
input datafile file number=00005 name=/oracle/app/oradata/source/example01.dbf
input datafile file number=00003 name=/oracle/app/oradata/source/undotbs01.dbf
input datafile file number=00004 name=/oracle/app/oradata/source/users01.dbf
channel ORA_DISK_1: starting piece 1 at 28-JUN-12
channel ORA_DISK_1: finished piece 1 at 28-JUN-12
piece handle=/oracle/app/fast_recovery_area/SOURCE/backupset/2012_06_28/o1_mf_nnndf_TAG20120628T143335_7yrj8kg6_.bkp tag=TAG20120628T143335 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:37
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 28-JUN-12
channel ORA_DISK_1: finished piece 1 at 28-JUN-12
piece handle=/oracle/app/fast_recovery_area/SOURCE/backupset/2012_06_28/o1_mf_ncsnf_TAG20120628T143335_7yrjcnnz_.bkp tag=TAG20120628T143335 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 28-JUN-12

2.8. Lets execute same query at target database to see our backup at catalog.

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[oracle@targetsrv ~]$ sqlplus catalog/catalog
SQL*Plus: Release 11.2.0.2.0 Production on Thu Jun 28 14:40:06 2012
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
SQL> SELECT BS_KEY, BACKUP_TYPE, COMPLETION_TIME
FROM   RC_DATABASE_INCARNATION i, RC_BACKUP_SET b
WHERE  i.DB_KEY = 1
AND    i.DB_KEY = b.DB_KEY
AND    i.CURRENT_INCARNATION = 'YES';  
 
    BS_KEY B COMPLETIO
---------- - ---------
        33 D 28-JUN-12
        34 D 28-JUN-12

2.9. It seems fine.If you need need to unregister your source db from target database these are the steps.

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
[oracle@sourcesrv ~]$ rman
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jun 28 14:45:46 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
RMAN> connect catalog catalog/catalog@TARGET
 
connected to recovery catalog database
 
RMAN> connect target sys/sys@SOURCE
 
connected to target database: SOURCE (DBID=2888707862)
 
RMAN> unregister database;
 
database name is "SOURCE" and DBID is 2888707862
 
Do you really want to unregister the database (enter YES or NO)? yes
database unregistered from the recovery catalog
 
RMAN> report schema
2> ;
 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 06/28/2012 14:46:46
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog
 
RMAN>

2.10. This step for deleting catalog at target database

Oracle PL/SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
[oracle@targetsrv ~]$ rman
 
Recovery Manager: Release 11.2.0.2.0 - Production on Thu Jun 28 14:49:15 2012
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
 
RMAN> connect catalog catalog/catalog@TARGET
 
connected to recovery catalog database
 
RMAN> drop catalog;
 
recovery catalog owner is CATALOG
enter DROP CATALOG command again to confirm catalog removal
 
RMAN> drop catalog;
 
recovery catalog dropped

Share this:

  • LinkedIn
  • Twitter

Konuyla ilgili diğer yazılar

  • Restore işleminde datafile pathlerinin yerinin değiştirilmesi
  • Oracle DUL (Data UnLoader) //Life is DUL without it
  • Oracle AMDU
  • Incremental backup icin Block Change Tracking dosyası olusturmak
  • Data block corrupt kurtarma işlemi

Filed Under: Oracle, RMAN Tagged With: catalog, oracle, rman, rman catalog

Comments

  1. AvatarVolkan says

    Friday March 29th, 2013 at 01:04 PM

    Anlatım güzel ama eksik konular var

  2. AvatarBugra Canbakal says

    Friday March 29th, 2013 at 05:40 PM

    Merhaba Volkan bey eleştirileriniz için teşekkürler, eksik gördüğünüz kısımlar nereler

  3. AvatarVolkan says

    Saturday March 30th, 2013 at 06:51 AM

    Merhaba Buğra Bey

    2.7. Kayıt bulunamadı, SOURCE veritabanına gidip backup’ı başlatıyorum.

    kısımda oraya geçişi kullanıcı girşini gibi bilgileri detaylandırsaydınız daha iyi olurdu diye düşünüyorum.

  4. AvatarBugra Canbakal says

    Saturday March 30th, 2013 at 07:13 AM

    Merhaba 2.7 yi biraz daha detaylandırdım Volkan bey

  5. AvatarVolkan says

    Saturday March 30th, 2013 at 10:39 AM

    Teşekkürler Buğra Bey ellerinize sağlık 🙂

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About Me



Language:

  • English
  • Turkish

Categories

  • Oracle
    • RAC – Real Application Cluster
    • RMAN
    • Single Node
    • Standby – Dataguard
  • OS
    • Linux

Blogroll

  • Emre Baransel
  • Gökhan Atıl
  • H. Tonguc Yılmaz
  • Kamil Türkyılmaz
  • Tanel Poder
  • Turkce Oracle
  • Turkish Oracle User Group
  • Uwe Hesse
  • Zekeriya Beşiroğlu

Archives

  • April 2014
  • March 2014
  • August 2013
  • June 2013
  • March 2013
  • January 2013
  • December 2012
  • November 2012
  • July 2012
  • June 2012
  • May 2012
  • January 2012
  • November 2011
  • October 2011
  • August 2011
  • July 2011
  • June 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • June 2010
OCP
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

[footer_backtotop]

Copyright © 2010-2014 Bugra Canbakal. All rights reserved.