In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the example analysis of RMAN full database recovery, which is very detailed and has a certain reference value. Interested friends must read it!
A full recovery
1. Full database [full recovery]
$rman target / Log in to the rman tool. If catalog is used, the login method rman target sys/oracle@ls catalogcata/cata@leo
RMAN > startup mount must be in mount state to restore and recover databases
RMAN > restore database; copy old data files to overwrite corrupted data files
RMAN > recover database; data file header SCN number synchronizes the last SCN number in the current log [full recovery]
RMAN > alter database open; Open the data file
Second, incomplete recovery
1. Based on point-in-time [incomplete recovery]
Use until time, until scn, until sequence parameters directly in the restore recover command
This method avoids the use of run code blocks, and it is recommended that you use this method [you must start to the mount state for restore and recover databases]
Startup mount
Restore database until time "to_date ('2012-04-04 19 hh34:mi:ss' 1315 50mm hh34:mi:ss')"
Recover database until time "to_date ('2012-04-04 19 hh34:mi:ss' 1315 50mm hh34:mi:ss')"
Alter database open resetlogs; [resetlogs is only valid after "incomplete recovery". Incomplete recovery must add the resetlogs/noresetlogs option to open the data, and reset the archive log sequence number from 1]
Note: this command restores the database to a specified point-in-time state, but you must have the last valid backup before that point in time, and all related archive logs.
two。 Incomplete recovery based on scn number
Startup mount
Restore database until scn 10000
Recover database until scn 10000
Alter database open resetlogs; [resetlogs is only valid after "incomplete recovery". Incomplete recovery must add the resetlogs/noresetlogs option to open the data, and reset the archive log sequence number from 1]
Note: this command restores the database to the specified scn number, but does not include this scn number.
3. Based on archive log sequence number [incomplete recovery]
Startup mount
Restore database until sequence 123 thread 1
Recover database until sequence 123 thread 1
Alter database open resetlogs; [resetlogs is only valid after "incomplete recovery". Incomplete recovery must add the resetlogs/noresetlogs option to open the data, and reset the archive log sequence number from 1]
Note: this command can restore the database to the specified archive log sequence number. If there is a breakpoint in the archive log list, it is convenient to use this method to recover. The breakpoint means that we can only recover to the starting point of the breakpoint.
If you directly restore database under open, the following error will be reported
Channel ORA_DISK_1: reading from backup piece / home/oracle/backup/DB_0fn7d50b backup block. This backup block is the last backup to restore. Find it automatically in the catalog library [if you must connect to catalog]
RMAN-00571: =
RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =
RMAN-00571: =
RMAN-03002: failure of restore command at 04/04/2012 12:03:18
ORA-19870: error reading backup piece / home/oracle/backup/DB_0fn7d50b error reading backup block
ORA-19573: cannot obtain exclusive enqueue for datafile 4 cannot include exclusive data file 4 queues
The above is all the contents of the article "sample Analysis of RMAN full Library recovery". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.