RMAN Catalog Server Configuration

preview_player
Показать описание
FIRST CREATE USER IN RMAN CATALOG FOR RMAN SCHEMA
On catalog
***********************************
create user rcat identified by rcat;
grant dba to rcat;
GRANT RECOVERY_CATALOG_OWNER TO rcat;
***********************************
connect to prod
RMAN: CREATE CATALOG;
and again, run below command
RMAN: register database;
***************************************
connect on catalog with prod
************************************************
making directory on catalog server
mkdir -p /u04/rman
chown -R oracle:oinstall /u04/rman
chmod -R 775 /u04/rman
******************************************************
now making directory on prod
mkdir -p /u04/rman
chown -R oracle:oinstall /u04/rman
chmod -R 775 /u04/rman
**********************************************************
create exports for nfs mount on catalog
vi /etc/exports

/u04/rman 172.20.251.201(no_root_squash,rw,sync)
****************************************
mount nfs on production with catalog folder
$ mount -t nfs 172.20.251.203:/u04/rman /u04/rman
***********************
for backup connect prod with catalog and take it full db backup

---------Backup script---------------------
RMAN: run
{
allocate channel d1 device type disk format '/u04/rman/Datafile_%d_%s_%p_%T' maxpiecesize 3 G;
allocate channel d2 device type disk format '/u04/rman/Datafile_%d_%s_%p_%T' maxpiecesize 3 G;
BACKUP DATABASE PLUS ARCHIVELOG;
crosscheck backup;
crosscheck archivelog all;
delete noprompt backup completed before 'SYSDATE - 3';
delete noprompt archivelog until time 'SYSDATE - 7';
release channel d1;
release channel d2;
}

**********************************************************************************
production control file restoration from catalog

RMAN: restore controlfile from autobackup;
on production SQL: alter database mount;
-----------------------------error-----------------------------
SQL: alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
-----------------------------------------------------------------------
on production SQL: recover database using backup controlfile until cancel;
then copy below command redo and paste output bellow this recovery command.
------------error----------------------------------------------
SQL: recover database using backup controlfile until cancel;
ORA-00279: change 1735107 generated at 03/22/2021 22:32:52 needed for thr
ORA-00289: suggestion :
/u01/app/oracle/recovery_area/CDB1/archivelog/2021_03_23/o1_mf_1_8_%u_.ar
ORA-00280: change 1735107 for thread 1 is in sequence #8

Specify log: RET=suggested | filename | AUTO | CANCEL
Log applied.
Media recovery complete.
SQL: alter database open resetlogs;
Database altered.
on production SQL: alter database open resetlogs;
*********************************************************************
DATAFILE RESTORATION
connect from catalog server
remove datafile from production. then run this command from catalog server
-------------------------------------------------------------------------
SQL: startup
ORACLE instance started.
Total System Global Area 1660944384 bytes
Fixed Size 8621376 bytes
Variable Size 989856448 bytes
Database Buffers 654311424 bytes
Redo Buffers 8155136 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 5 - see DBWR trace file
------------------------------------------------------------------------------
RMAN: restore datafile 5;
RMAN: recover database;
-----------production------------------------------------
SQL: shu abort
ORACLE instance shut down.
SQL: startup
ORACLE instance started.
Total System Global Area 1660944384 bytes
Fixed Size 8621376 bytes
Variable Size 989856448 bytes
Database Buffers 654311424 bytes
Redo Buffers 8155136 bytes
Database mounted.
Database opened.
Рекомендации по теме