In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to use RMAN to perform flashback database operations on CDB", the content is easy to understand, clear, hope to help you solve your doubts, the following let Xiaobian lead you to study and learn "how to use RMAN to perform flashback database operations on CDB" this article.
Performing a flashback database on CDB is similar to performing a flashback database operation on non-CDB, with the following steps:
1. Use SQL*Plus to connect to the target database to determine the target SCN, restore point, or point in time of the flashback operation
SQL > SELECT OLDEST_FLASHBACK_SCN, OLDEST_FLASHBACK_TIME FROM VLASHBACKS DATABASE LOGTION OLDESTESTFLASHBACKS SCN OLDEST_FLASH--5090113 17-DEC-17SQL > SELECT CURRENT_SCN FROM VLASBASBASTHACKETS CRURENTSCN-6003920
two。 Delete the data in table T1
SQL > select count (*) from T1; COUNT (*)-39SQL > delete from T1 politics 39 rows deleted.SQL > commit;Commit complete.
3. Close the database, make sure that no instance opens the database, and then boot to the mount state
SQL > shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL > startup mountORACLE instance started.Total System Global Area 6442450944 bytesFixed Size 8807168 bytesVariable Size 1895828736 bytesDatabase Buffers 4529848320 bytesRedo Buffers 7966720 bytesDatabase mounted.
4. Run the flashback database command to flash the entire CDB back to the specified point in time
SQL > flashback database to scn 6003920 X Flashback complete.
5. Set CDB to read-only in the SQL*Plus command window
SQL > alter database open read only;Database altered.
6. If the flashback operation meets your desired results, you can perform the following two mutually exclusive options:
. Open the database using the resetlogs option. If the current database is read-only, use SQL*Plus to execute the following command:
Shutdown immediatestartup mountalter database open resetlogs
. Use Oracle Data Pump to export the objects you need, and then use RMAN to restore the database to the current time, by reapplying all the changes in the redo log to the database
The database is restored to the current point in time to undo changes made by the flashback database.
RMAN > recover database;Starting recover at 18-DEC-17allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=11 instance=jy1 device type=DISKstarting media recoverymedia recovery complete, elapsed time: 00:00:02Finished recover at 18-DEC-17Media recovery complete.SQL > alter database open;Database altered.SQL > alter pluggable database all open read write;Pluggable database altered. The above is all the contents of the article "how to use RMAN to perform flashback database operations on CDB". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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.