Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Existing Scenario in eSeva: Currently we are using the export/import in eSeva to take the backup of the database and to restore the database. By using this we are able to take the full backup of the database but not the incremental backups. The load on server during this backup is more, so that the process of the normal transactions gets slow and even the database hangs up and needs restart. The space occupied by this backup is more. Hence, the data loss is more in this technique. To overcome this we are implementing the advanced backup and recovery technique Rman: Enhanced Scenario in eSeva:
By implementing the Rman technique backup and recovery can be automated.
We can run incremental backups,so that the load on the database during the backup will be low.
The database can be restored faster compared to export/import tool.
We can run incremental backups multiple times a day,so that the data loss comes down compared to the Existing Technique. The space consumed by the backup will be less.
Can store frequently executed commands as scripts,independent of OS Empty blocks are not copied Provides incremental backup feature to copy onlychanged blocks Can deduct block corruption while taking backup Parallelize operation to reduce backup time Can reduce reads per file, thus minimizing impact todatabase performance
STEPS TO BE FOLLOWED BEFORE CONNECTING Database should be in archive log mode Listeners should be started in both the target and catalogdatabase Recovery catalog database should be always up and running Target database should be in the mount phase (to read controlfiles) RMAN Backup Types Fullbackup of a data file that includes every allocated blockin the file being backed up Incrementallevel 0 Backup of every block except blockscompressed outLevel 1- includes blocks that have been changed sincethe parent backup was taken. OpenA backup of online, read/write datafiles when thedatabase is open. ClosedA backup of any part of the target database when it ismounted but not open. Closed backups can beconsistent or inconsistent. ConsistentBackup taken when the database is mounted (but not inopen),after proper shutdown.checkpoint SCNs in thedatafile headers match the header information in thecontrol file. InconsistentA backup of any part of the target database when it isopen or when a crash occurred or SHUTDOWN ABORTwas run prior to mounting.An inconsistent backuprequires recovery to become consistent. RMAN> BACKUP INCREMENTAL LEVEL 1 differential DATABASE;
Recovery Decide your scenario Lost controlfile Lost datafile Lost entire database Restore Restore database - Restores entire database including controlfile Restore datafile <filename> - Restores specific datafiles Restore tablespace <tablespace_name> - Restores all datafilesbelongs to tablespace. Restore controlfile - Restores only controlfile Restore archivelog all - Restores all archivelog files. RECOVER If restore completed successfully then following commandcan be executed based on the recovery scenario. Recover database - Recovering entire database Recover datafile <filename> - Recovering specificdatafiles recover tablespace <tablespace_name> - Recovering alldatafiles belongs to the tablespace recover database until cancel - Recovering database untilcanel recover database until time = <TIME> - Until time recover database until SCN = <SCN> - Until SpecificSCN recover database until SEQUENCE =<SEQ> - Until specificsequence
Physical backups are backups of the physical files used in storing and recovering your database, such as datafiles, control files, and archived redo logs. Ultimately, every physical backup is a copy of files storing database information to some other location, whether on disk or some offline storage such as tape. Logical backups contain logical data (for example, tables or stored procedures) exported from a database with an Oracle export utility and stored in a binary file, for later re-importing into a database using the corresponding Oracle import utility.