Oracle Dataguard Common SQL statements

Source: Internet
Author: User

select log_mode,open_mode ,database_role from v$database; --View Dataguard Master Standby status Select  status from v$instance; --View Database Status alter database recover managed  standby database cancel; --canceling the log application Alter database recover managed standby  database using current logfile disconnect;--Open Real-time application select sequence#,applied The  from v$archived_log order by sequence#; --repository, if all yes , indicates that the standby library has copied the alter  database recover managed standby database disconnect from session;-- Standby mount Application log alter  system switch logfile;--Main Library switch log--start and stop DG Main Library alter system set  log_archive_dest_state_2 =  ' defer '; lsnrctl stopshutdown immediatestartupalter system  set log_archive_dest_state_2 =  ' Enable ';--Standby Depot stop alter database recover  Managed standby database cancel;shutdown immediate--standby startup mount --boot to mount status Alter database recover  managed standby database disconnect from session; --boot log application primary and Standby execution archive  log list  See if synchronization, the library executable select * from v$archive_gap; see if there is delay Alter  system  switch logfile;--The main library to perform the switch log, to see if the library is in time to apply the log synchronization successfully, the standby library execution alter database recover managed  standby database cancel;--Cancel the log application alter database open;--open the library alter database  recover managed standby database using current logfile disconnect;-- Standby to enable real-time application select log_mode,open_mode ,database_role from v$database;--Check the state of the standby library


Oracle Dataguard Common SQL statements

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.