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)06/01 Report--
1. Check the status of the standby database
SQL > select open_mode,database_role,db_unique_name from v$database
2. Set up the standby database and apply the log mode status
SQL > alter database recover managed standby database using current logfile disconnect from session
3. Cancel the automatic recovery of the reserve database
SQL > alter database recover managed standby database cancel
4. Turn on the real-time application status mode
SQL > alter database recover managed standby database using current logfile disconnect
4. Check the group to which the log is applied
SQL > select max (SEQUENCE#) from v$archived_log where applied='YES'
5. Switch roles between main library and standby database
5.1 switch from main library to standby library
Alter database commit to switchover to physical standby
When the alter database commit to switchover to physical standby with session shutdown;-- main library has a session connection
Shutdown immediate
Startup nomount
Alter database mount standby database
Alter database recover managed standby database disconnect from session
5.2 switch from library to main library
Alter database commit to switchover to primary
Shutdown immediate
Startup
Alter system switch logfile
6. The standby database automatically uses the logs sent from the main database for recovery.
Alter database recover automatic standby database
Sometimes after the standby is interrupted for a period of time, enabling the application log mode cannot recover from the archive log normally. You need to execute this instruction to apply the archive log to the nearest archive log and then enable the application log mode.
7. Change the protection mode
Alter database set standby database to maximize protection
Alter database set standby database to maximize availability
Alter database set standby database to maximize performancen
Example of v$ view application related to recovery progress
1. Check the activity of the process-v$managed_standby
SQL > select process,client_process,sequence#,status from v$managed_standby
2. Confirm the progress of redo application-v$archive_dest_status
SQL > select dest_name,archived_thread#,archived_seq#,applied_thread#,applied_seq#,db_unique_name from v$archive_dest_status where status='VALID'
3. Check the path and creation information of the archive file-v$archived_log
SQL > select name,creator,sequence#,applied,completion_time from v$archived_log
4. Query archiving history-v$log_history
SQL > select first_time,first_change#,next_change#,sequence# from v$log_history
Let's take a few more examples of v$ view applications related to log applications:
5. Query the basic information of the current data-v$database information
SQL > select database_role,db_unique_name,open_mode,protection_mode,protection_level,switchover_status from v$database
6. Query the information of quick startup after failover
SQL > select fs_failover_status,fs_failover_current_target,fs_failover_threshold,fs_failover_observer_present from v$database
7. Check the application mode (whether real-time applications are enabled)-v$archive_dest_status
SQL > select recovery_mode from v$archive_dest_status where dest_id=2
12. Data guard event-v$dataguard_status
SQL > select message from v$dataguard_status
8. Delete and add standby log
Alter database drop standby logfile group 1;-add a log group
Alter database add standby logfile thread 1 group 1 ('/ u02 prime Oradata size size 4096M;-Delete log group
Alter database drop logfile member'/ u02Universe oradataUniverse standbylogAccording to standbylogUniverse;-Delete a member of the log group
ALTER DATABASE ADD standby LOGFILE MEMBER'/ u02 TO GROUP ALTER DATABASE ADD standby LOGFILE MEMBER'/ u02 TO GROUP
* * adjust the frequency of physical standby log applications
To put it bluntly, to adjust the application frequency is to adjust the io reading capacity, so we can usually start from the following aspects:
1. Set recover parallelism
During media recovery or redo application, you need to read the redo log file. The default is serial recovery. We can perform recover.
Add a parallel clause to specify the degree of parallelism to improve read and application performance, such as:
SQL > alter database recover managed standby database parallel 2 disconnect from session
The recommended value for parallel is # CPUs*2
2. Speed up the frequent application of redo
Setting the initialization parameter DB_BLOCK_CHECKING=FALSE can improve the application efficiency by about 2 times. This parameter is the verification data.
Whether the block is valid or not, it is basically acceptable for standby to disable verification, in addition to a related initialization parameter.
DB_BLOCK_CHECKSUM, it is recommended that this parameter be set to true in both primary and standby.
3. Set PARALLEL_EXECUTION_MESSAGE_SIZE
If parallel recovery is turned on, increase the initialization parameter: the parameter value of PARALLEL_EXECUTION_MESSAGE_SIZE
For example, 4096 can also improve performance by about 20%, but it should be noted that increasing the parameter value of this parameter may take up more memory.
4. Optimize disk Ibank O
The biggest bottleneck during recovery is the read and write of Iswap O. To alleviate this bottleneck, use local asynchronous Iswap O and set initialization parameters.
DISK_ASYNCH_IO=TRUE will help. The DISK_ASYNCH_IO parameter controls whether the disk Imando O of the data file is asynchronous. Some
In some cases, asynchronous Iamp O can reduce the parallel reading of database files and improve the whole recovery time.
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.