11g ve daha önceki versiyonalrda database’ lerin backuplarını almak için rman catalog database’ ini kullandığımız yapılarda, rman catalog database’ inde aşağıdaki gibi user oluşturup resource, connect,recovery_catalog_owner yetkilerini de verdiğimi de production tarafından catalog database’ ine bağlanıp sorunsuzca catalog create edip sonrasında da register edebiliyorduk. Ancak 12c ile birlikte bu işlemler ile catalog database’ inde create catalog komutunu çalıştırdığımız da aşağıdaki gibi bir hata aldık ;
— rman catalog database’ inde user create işlemi ;
create user tdb default tablespace users identified by password ;
grant resource, connect,recovery_catalog_owner to tdb ;
Backupını almak istediğimiz sunucu üzerinden catalog database’ ine bağlanıp catalog create etmeye çalıştığımız da ;
[oracle@Redhat70 admin]$ rman target / catalog tdb/Password1@RMAN_CATALOG
Recovery Manager: Release 12.1.0.2.0 – Production on Wed May 20 11:30:50 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: TDB (DBID=3761906654)
connected to recovery catalog database
RMAN> create catalog ;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-07539: insufficient privileges to create or upgrade the catalog schema
12c birlikte gelen değişiklik nedeniyle catalog create etmeden önce yapılması gereken bir takım adımlar var ;
Oracle 12c binary ‘ si altında yer alan aşağıdaki script çalıştırılır;
[oracle@Redhat70 ~]$ sqla
SQL*Plus: Release 12.1.0.2.0 Production on Wed May 20 15:59:39 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> @$ORACLE_HOME/rdbms/admin/dbmsrmansys.sql
Session altered.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Session altered.
SQL>
Sonrasında sqlplus üzerinden catalog database’ ine bağlanarak yine 12c binary altında bulunan aşağıdaki scripti çalıştırıyoruz ;
[oracle@Redhat70 12.1.0.2]$ cd rdbms/admin/
[oracle@Redhat70 admin]$ sqlplus sys@RMAN_CATALOG as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Wed May 20 16:04:14 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @dbmsrmansys.sql
alter session set “_ORACLE_SCRIPT” = true
*
ERROR at line 1:
ORA-02248: invalid option for ALTER SESSION
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
Grant succeeded.
alter session set “_ORACLE_SCRIPT” = false
*
ERROR at line 1:
ORA-02248: invalid option for ALTER SESSION
SQL>
Şimdi rman catalog database’ ine tekrar bağlanarak tekrar deniyoruz ;
[oracle@Redhat70 admin]$ rman target / catalog tdb/Password1@RMAN_CATALOG
Recovery Manager: Release 12.1.0.2.0 – Production on Wed May 20 16:05:50 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: TDB (DBID=3761906654)
connected to recovery catalog database
RMAN> create catalog
recovery catalog created
RMAN> register database ;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
RMAN> report schema ;
starting full resync of recovery catalog
full resync complete
Report of database schema for database with db_unique_name TDB
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
—- ——– ——————– ——- ————————
1 810 SYSTEM YES /u02/oradata/tdb/dbf/tdb/system01.dbf
3 930 SYSAUX NO /u02/oradata/tdb/dbf/tdb/sysaux01.dbf
4 80 UNDOTBS1 YES /u02/oradata/tdb/dbf/tdb/undotbs01.dbf
5 250 PDB$SEED:SYSTEM NO /u02/oradata/tdb/dbf/tdb/pdbseed/system01.dbf
6 5 USERS NO /u02/oradata/tdb/dbf/tdb/users01.dbf
7 490 PDB$SEED:SYSAUX NO /u02/oradata/tdb/dbf/tdb/pdbseed/sysaux01.dbf
8 250 PDBTDB1:SYSTEM NO /u02/oradata/tdb/dbf/tdb/pdbtdb1/system01.dbf
9 520 PDBTDB1:SYSAUX NO /u02/oradata/tdb/dbf/tdb/pdbtdb1/sysaux01.dbf
10 5 PDBTDB1:USERS NO /u02/oradata/tdb/dbf/tdb/pdbtdb1/pdbtdb1_users01.dbf
11 1024 PDBTDB2:SYSTEM NO /u02/oradata/tdb/dbf/tdb/pdbtdb2/system01.dbf
12 1024 PDBTDB2:SYSAUX NO /u02/oradata/tdb/dbf/tdb/pdbtdb2/sysaux01.dbf
13 5 PDBTDB2:USERS NO /u02/oradata/tdb/dbf/tdb/pdbtdb2/pdbtdb2_users01.dbf
14 100 PDBTDB2:PDBTDB2_DATA01 NO /u02/oradata/tdb/dbf/tdb/pdbtdb2/pdbtdb2_data01.dbf
15 100 PDBTDB2:PDBTDB2_INDEX01 NO /u02/oradata/tdb/dbf/tdb/pdbtdb2/pdbtdb2_index01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
—- ——– ——————– ———– ——————–
1 60 TEMP 32767 /u02/oradata/tdb/dbf/tdb/temp01.dbf
2 20 PDB$SEED:TEMP 32767 /u02/oradata/tdb/dbf/tdb/pdbseed/pdbseed_temp012015-05-11_10-38-27-AM.dbf
3 20 PDBTDB1:TEMP 32767 /u02/oradata/tdb/dbf/tdb/pdbtdb1/temp012015-05-11_10-38-27-AM.dbf
4 20 PDBTDB2:TEMP 32767 /u02/oradata/tdb/dbf/tdb/pdbtdb2/temp012015-05-11_10-38-27-AM.dbf
Bizim örneğimiz de yeni kurulan bir 12c database’ inin catalog database’ ine register edilmesi örneğini yaptık ancak 11g’ den veya daha eski bir versiyondan 12c’ ye upgrade ettiğiniz de de aynı problemle karşılaşacaksınız o zamanda bu yöntem ile sorununuza çözüm üretebilirsiniz.