Catalog Creation and Different Types of Backup
Catalog Creation and Different Types of Backup
Catalog Creation and Different Types of Backup
==============================================================================
sqlplus / as sysdba
shutdown immediate
startup mount
rman target /
vi tnsnames.ora
cat tnsnames.ora
PDBTS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdbts.localdomain)
)
)
ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb.localdomain)
)
)
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.localdomain)
)
)
vi tnsnames.ora
cat tnsnames.ora
PDBTS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdbts.localdomain)
)
)
ORCLPDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orclpdb.localdomain)
)
)
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.localdomain)
)
)
CATDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = oracle.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.localdomain)
)
)
create catalog;
register database;
report schema;
report obsolete;
report unrecoverable;
show all;
run {
allocate channel c1 type disk;
backup as backupset format '/u01/app/oracle/rman_bkp/df_%d_%s_%p'
incremental level 0 database;
backup as backupset format '/u01/app/oracle/rman_bkp/ar_%d_%s_%p'
archivelog all delete input;
}
sqlplus / as sysdba
conn hr/hr
run {
allocate channel c1 type disk;
backup as backupset format '/u01/app/oracle/rman_bkp/df_%d_%s_%p'
incremental level 1 cumulative database;
backup as backupset format '/u01/app/oracle/rman_bkp/ar_%d_%s_%p'
archivelog all delete input; <--------means first take archivelog backup and
delete old archivelog backup
}
cd /u02/rman_bkp/
sqlplus / as sysdba
incremental backup:
---------------------
run {
allocate channel c1 type disk;
backup as backupset format '/u01/app/oracle/rman_bkp/df_%d_%s_%p'
incremental level 1 database;
}
cd /u01/rman_bkp/
cd /u01/rman_bkp/
rman target / catalog rmancat/rmancat@catdb
cd /u02/rman_bkp
-----Note before going to take backup first solve proble deleted files so blow step
show be necessary
crosscheck backup;
crosscheck backup;
-------------If any backup want to keep forever or long time must media recovery
active then do below---
list backup;
-------------If do not want forever or long time must media recovery active then do
below---