Xem mẫu
Database Recovery
Copyright © 2006, Oracle. All rights reserved.
Objectives
User man. RMAN CLI EM Complete Incomplete Control file RO TBS
After completing this lesson, you should be able to:
• Perform complete or incomplete user-managed recovery
• Identify situations where incomplete recovery is necessary
• Perform complete or incomplete recovery by using RMAN
• Perform incomplete recovery based on time, SCN, log sequence, restore points, or the cancel method
• Recover an automatically backed up control file • Use Enterprise Manage to perform recovery
• Recover read-only tablespaces
5-2 Copyright © 2006, Oracle. All rights reserved.
Recovery Methods
There are two methods for performing recovery: • User-managed recovery
– Files must be maintained and moved into place manually.
– Use SQL*Plus commands. • RMAN recovery
– Files are managed automatically.
– Use RMAN functionality including all repository maintenance and reporting capabilities.
– This can be done by using Enterprise Manager.
– Oracle Corporation recommends using this method.
5-3 Copyright © 2006, Oracle. All rights reserved.
User-Managed Recovery: RECOVER Command
• Restore all database files from a backup and then recover the database:
SQL> RECOVER DATABASE
• Restore the damaged data files from a backup and then recover the data files:
SQL> RECOVER TABLESPACE index_tbs
Or:
SQL> RECOVER DATAFILE
2> `/oradata/indx01.dbf`
5-4 Copyright © 2006, Oracle. All rights reserved.
RMAN Recovery: RESTORE and RECOVER Commands
User man. > RMAN CLI
EM Complete Incomplete Control file RO TBS
run{
sql "ALTER TABLESPACE inv_tbs OFFLINE IMMEDIATE"; RESTORE TABLESPACE inv_tbs;
RECOVER TABLESPACE inv_tbs DELETE ARCHIVELOG; sql "ALTER TABLESPACE inv_tbs ONLINE";
}
5-5 Copyright © 2006, Oracle. All rights reserved.
...
- tailieumienphi.vn
nguon tai.lieu . vn