In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how the process of backup and recovery of oracle database is. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Oracle database backup and Oracle database recovery are two necessary skills for using Oracle database. After mastering the installation method of Oracle database, the first thing to understand is backup and restore. The reason why Oracle database backup and recovery is a necessary skill, because in the operation of the database will inevitably occur errors or accidental data loss and other problems, Oracle database backup can limit to make up for these problems, and Oracle database restore is after the database problems, restore the data to the backup state, it is no exaggeration to say that these two are the two most important skills in database operation. Let's introduce the methods of backup and restore of Oracle database:
Oracle database backup
There are many Oracle database backup methods, and the purpose is the same. There are three commonly used Oracle database backup methods: Oracle cold backup, Oracle hot backup and Export export database objects.
1. Oracle cold backup is the simplest backup of Oracle; you must shut down the database before performing a cold backup; then use operating system utilities or third-party tools to back up all related database files.
Advantages: easy and fast backup. Can recover easily and quickly. The execution is simple.
Cons: the database must be closed and no point recovery can be done.
2. Oracle hot backup is the process of backing up data when the database is running. The prerequisite for performing a hot backup is that the database is running in archivable log mode. It is suitable for the key application system of 24X7 uninterrupted operation.
Advantages: the database can be open when backing up. Hot backup can be used for point recovery. Initialization parameter files and archive logs are closed when the database is running normally, and can be copied with operating system commands.
Disadvantages: the execution process is complex. Due to the continuous operation of the database, testing is difficult. You cannot copy an open file with the operating system utility. You must use the ocopy tool provided by Oracle to copy the open file. Hot backup may cause CPU, Iamp O overload, should be carried out when the database is not too busy.
3. Both cold backup and hot backup back up physical database files, so it is called physical backup. Export backs up database objects, so it is called logical backup.
Advantage: ability to perform object or row recovery. Backup and recovery are faster. Ability to migrate databases across operating system platforms. The database can run all the time.
Cons: export is not an alternative to cold backup and hot backup. Cold and hot backup can protect the media from failure. Export backups protect users or application errors.
Oracle database recovery
Any software can be reinstalled intentionally or unintentionally, such as how to restore the Oracle database? There are several common ways to restore Oracle databases:
1. Using IMPORT to IMPORT the data file from EXPORT to the new database, this way can restore any database object to its state when it was exported, and the subsequent changes will be irreparable. The commands of IMPORT can be carried out interactively. For the specific meaning of each parameter, please see the detailed explanation of ORACLEEXP/IMP parameters. This approach is suitable for environments that do not adopt the archive pattern.
2. If the database is running in archive mode, once the database is damaged, the database can be restored to the breakpoint state through cold backup (hot backup) and archive backup.
Database control file recovery (assuming all control files are corrupted):
Database is based on file system: tar, cp and other commands of the operating system can be used.
The database is based on bare devices: ddif=$ORACLE_BASE/con.bakof=/dev/rdrd/drd1seek=12
Database data file recovery
Recovery of data and index tablespace and system tablespace:
Copy back the related database file and all logical log files generated since the data file backup and execute the following command:
Svrmgrl > startupmount
Svrmgrl > alterdatabaserecoverautomatic
If the control file is corrupted, svrmgrl > alterdatabaserecoverusingbackupcontrofile; follow the prompts to enter the log file name and the redolog file name
Svrmgrl > alterdatabaseopenresetlogs
Recovery of temporary database files and rollback tablespaces: simply offlinedrop and rebuild.
Note: if the database is not running in archive mode, the restore can only be restored to the state it was in the last backup.
The backup and recovery technology of ORACLE can be said to be broad and profound. What I know is only a small part, and it is not very thorough. At the same time, I would also like to remind all friends that backup is very important, if there are conditions, we must use ARCHIVE mode, otherwise, something may go wrong and you can't even cry.
The above is what the oracle database backup and recovery process is like, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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.