Академический Документы
Профессиональный Документы
Культура Документы
C.D 1 C.D 2
L – Listener
C.D – Connect descriptor
• TARGET DATABASE – where you carry backup,restore and
recovery.
• Incremental
• level 0 –Backup of every block except blocks compressed out
• Level 1- includes blocks that have been changed since the parent backup was
taken.
• Open
• A backup of online, read/write datafiles when the database is open.
• Closed
• A backup of any part of the target database when it is mounted but not
open. Closed backups can be consistent or inconsistent.
• Consistent
• Backup taken when the database is mounted (but not in open),after proper
shutdown.
• checkpoint SCNs in the datafile headers match the header information in the
control file.
• Inconsistent
• A backup of any part of the target database when it is open or when a crash
occurred or SHUTDOWN ABORT was run prior to mounting.
• An inconsistent backup requires recovery to become consistent.
INCREMENTAL BACKUPS
• Create listener
• Start listener
• Ping
CONFIGURING TARGET DATABASE
• CREATING LISTENER
Go to netmgr and add a listener
• STARTING LISTENER
Start listener using lsnrctl
CONFIGURING CATALOG DATABASE
• CREATE LISTENER
Go to netmgr and add a listener
• STARTING LISTENER
Start listener using lsnrctl
• PINGING
Check by command –> ping 10.1.15.91
CREATING PASSWORD FILE FOR TARGET DATABASE
• > Startup
• > Show parameter spfile
• > Alter system set remote_login_passwordfile=exclusive
scope=spfile
• > shut immediate
• cd $ ORACLE_HOME / dbs
• $ orapwd file = orapwtarget password = sys
• $ cd network/admin
• $ vi sqlnet.ora
sqlnet.authentication_services = none
names.directory_path = (tnsnames)
• Target database login issued by RMAN is always sysdba
CREATING CATALOG USER
• $ RMAN
Backing up datafile:
RMAN>backup datafile
‘<pathname>/<datafile name>’;
It will backup datafile in Flash
Recovery Area/we can specify a path
RESTORE
• Restore database - Restores entire
database including controlfile
• Restore datafile <filename> - Restores
specific datafiles
• Restore tablespace <tablespace_name> -
Restores all details belongs to tablespace.
• Restore controlfile - Restores only controlfile
• Restore archivelog all - Restores all
archivelog files.
RECOVER
Recover database - Recovering entire database
Recover datafile <filename> - Recovering specific
datafiles
Recover tablespace <tablespace_name> -
Recovering all datafiles belongs to the tablespace
Recover database until cancel - Recovering
database until cancel
Recover database until time = <TIME> - Until time
Recover database until SCN = <SCN> - Until
Specific SCN
Recover database until SEQUENCE =<SEQ> - Until
specific sequence
SCENARIOS
Target database
Shut abort
Startup nomount
Connect to rman catalog and target database
RMAN > run
{
Restore controlfile;
alter database mount;
recover database;
alter database open resetlogs;
}
Scenario 3 - Recover lost datafile
RMAN> RUN
{
alter tablespace sysaux offline;
restore datafile;
‘/home/oracle10g/data/sysaux1.dbf';
recover datafile;
‘/home/oracle10g/data/sysaux1.dbf';
alter tablespace sysaux online;
}
Scenario 4 - Recover lost tablespace
RMAN> run
{
alter tablespace sysaux offline
restore tablespace sysaux
recover tablespace sysaux
alter tablespace sysaux online
}
THANK YOU