In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "what is the concept of complete recovery and incomplete recovery in the database". Many people will encounter this dilemma in the operation of actual cases. next, let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!
Full restore: restores blocks to the point in time closest to the current time using redo logs or incremental backups. It is called full recovery because Oracle applies all the changes in the archive log and the online redo log.
Incomplete recovery: uses a backup to produce a database that is not the current version. In other words, all redo logs generated after the backup is generated will not be applied during the recovery process.
An incomplete recovery of the entire database is usually generated under the following circumstances
● media failure corrupted some or all of the online redo log files
Data loss caused by ● user actions, for example, the user mistakenly deleted a table
● cannot recover completely due to the loss of individual archive log files.
● has lost the current control file and must open the database with the backup control file.
"in order to perform an incomplete media restore, you must restore the data files using a backup before the recovery point, and open the database using the RESETLOG option after the restore is complete."
Resetlogs parameter
During an incomplete recovery, you usually need to open the database using the resetlogs command because we want to detach from the existing redo log stream that has been established. The resetlogs parameter indicates the end of the logical lifetime of one database and the beginning of the logical lifetime of another. The logical lifetime of a database is also called an incarnation. Each time you use the resetlogs command, the SCN counter is not reset, but Oracle resets other counters, such as the log sequence number, as well as the contents of the online redo log.
"after testing, when you try to perform a full restore in non-archive mode, RMAN reports the following error when alter database open is issued:"
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
But if you add resetlogs, you won't get it wrong. And from the point of view of the recovery process, the period is indeed used in the online log document, that is, it performs a full recovery. This means that after performing a full recovery in non-archive mode, the redo log should also be reset when the database is opened. In fact, it is also good to think that in non-archived mode, there are no archived redo logs, and after using online logs for full recovery, these online log files are useless, so Oracle resets the log file sequence number (personally, theoretically, it can not be reset, the log file sequence number is directly increased on the existing log sequence number, but in this way the log sequence number will become larger and larger. Oracle should have reset the redo log when performing both full and incomplete recoveries in non-archive mode.
Complete recovery
Full recovery is simple, not to mention, as follows:
$rman target / # # Log in to the rman tool. If catalog is used, the login method rman targetsys/Oracle@lscatalogcata/cata@leo
RMAN > startup mount # # must be in mount status 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 [resetlogs]
Incomplete recovery
Incomplete recovery has a core point to keep in mind: incomplete recovery affects the entire database, and you cannot perform incomplete recovery on only part of the database. The methods used for incomplete recovery are usually time-based, SCN-based, log sequence, restore point, or delete-based recovery.
$rman target /
RMAN > startup mount
RMAN > run
2 > {
3 > set until time "to_date ('07 + 01 *!
4 > restore database
5 > recover database
6 > alter database open
7 >}
From the point of view of the implementation process, incomplete recovery is the addition of a constraint, time / SCN, etc. "as for a point-in-time recovery above, Oracle looks for backup sets that are prior to and closest to the target recovery time." If no available backup set is found, an error will be reported.
This is the end of the content of "what is the concept of complete recovery and incomplete recovery in the database". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.