Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The use of flashback database

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle flashback technology-use flashback logs to recover the user's logic errors, this repair is only for the recovery of user logic errors, but does not involve the entire database recovery is more targeted and the recovery time is greatly reduced. For the flashback database, the flashback log is not archived to enable the flashback database-the database is in archive mode using the directory specified by the DB_RECOVERY_FILE_DEST parameter as the storage directory, and the value of this parameter is the fast recovery area db_flashback_retention_target The value of this parameter is an one-minute number. Evaluate the required flash recovery area space select estimated_flashback_size,retention_target through the data dictionary v$flashback_database_log Flashback_size from v$flashback_database_log mount-alter database flashback on View enabled status select flashback_on from v$database Turn off the flashback database alter database falshback off; to disable the flashback feature alter tablespace users flashback off in a table space Use the data dictionary V$TABLESPACE to query whether the tablespace is not flashback protected col flashback_on for A15 select name,flashback_on from v$tablespace If you want to re-enable the flashback database for the tablespace-- you need to boot the database to the Mount state startup mount alter tablespace users flashback on; startup mount alter database flashback off The flashback database method can be implemented using either the RMAN method or the SQL instruction. Use RMAN flashback database in method 1. 3 below. Flash the database back to a certain point in time, and specify the specific time flashback database to time=to_date ('xxxx-xx-xx xx:xx:xx','yyyy-mm-dd hh34:mi:ss') 2. 0 through the to_date function. It is impractical to flash the database back to some old SCN, flashback database to scn = xxxxx 3. Flashes the database back to the state before the specific log sequence number, excluding the serial number 345 flashback database to sequence=345 thread=1; using the sql instruction to flash back to database 1. Flash the database back to the state specified by the timestamp flashback database to timestamp (sysdate-1/24) 2. Flashback database to a past SCN flashback database to scn 678854 to perform flashback database, you need to switch the database to MOUNT state. After the flashback database ends, you need to open the database with resetlogs, that is, you need to reset the redo log. Causes the redo log sequence number to re-count to create a user using the flashback database, and grants the relevant permissions to log in to the new user and create a test table Insert records to delete users view related records in the flashback log and use the view v$flashback_database_log select * from v$flashback_database_log Using resetlogs to open the database, the flashback log is still valid. Monitoring the flashback database uses v$flashback_database_log to query the minimum SCN number that can be flashed back and the time point at which it can be flashed back. Select oldest_flashback_scn,oldest_flashback_time from v$flashback_database_log Data dictionary view v$flashback_database_stat, which is used to monitor the overhead of flashback logs writing flashback data, such as recording the start and end time of the current flashback record Information such as the amount of data recorded by flashback and the amount of data recorded by redoing logs select * from v$flashback_database_stat Monitor the spatial changes in the flash recovery area Increase the space select name,space_limit,space_used,space_reclaimable of the flash recovery area if necessary Maximum usage limit of space_limit space for directories in number_of_files from v$recovery_file_dest name fast recovery area The space used by space_used the space that can be reclaimed by space_reclaimable uses the limit of flashback database 1. The data file is deleted or shortened by 2. 5%. A control file was restored or rebuilt within the flashback time range. Before the resetlogs operation 4. The tablespace was deleted

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.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report