Coming soon !!!
Tuesday, 16 December 2014
About
Rajasekhar's Blog
Oracle DBA - Tips and Techniques
10g Oracle Certified Professional
11g Oracle Certified Professional
10g RAC Expert
11g RAC Expert
Certified GoldenGate Implementation Specialist
Oracle 11g Exadata Implementation Specialist
DBA Monitor
How to find your own session
SELECT sid FROM v$mystat WHERE rownum = 1;
SELECT sid FROM V$SESSION WHERE audsid = userenv(‘sessionid’);
SELECT sid FROM V$SESSION WHERE audsid = SYS_CONTEXT(‘userenv’,'sessionid’);
SELECT sid FROM v$mystat WHERE rownum = 1;
SELECT sid FROM V$SESSION WHERE audsid = userenv(‘sessionid’);
SELECT sid FROM V$SESSION WHERE audsid = SYS_CONTEXT(‘userenv’,'sessionid’);
Monday, 15 December 2014
Changing the Data Guard Protection Mode
#################################################################
change Protection mode from Maximum Performance to Maximum Availability
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note: When changing to Maximum Availability or Maximum Protection mode standby redo logs must be present on the standby.
select protection_mode from v$database;
alter system set log_archive_dest_2='SERVICE=pepsi LGWR SYNC AFFIRM NET_TIMEOUT=30 VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pepsi' scope = both;
alter database set standby database to maximize availability;
select protection_mode from v$database;
#################################################################
--------------------------------------------------------------------
change Protection mode from Maximum Availability to Maximum Performance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
select protection_mode from v$database;
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=pepsi LGWR ASYNC NOAFFIRM NET_TIMEOUT=30 VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pepsi' scope=both;
alter database set standby database to maximize performance;
select protection_mode from v$database;
--------------------------------------------------------------------
change Protection mode from Maximum Performance to Maximum Protection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
select protection_mode from v$database;
alter system set log_archive_dest_2='SERVICE=pepsi LGWR SYNC AFFIRM NET_TIMEOUT=30 VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pepsi' scope = both;
alter database set standby database to maximize protection;
select protection_mode from v$database;
Note:
If you decide to change the protection mode to Maximum Protection you will need to change the protection while the primary is mounted and not open.
--------------------------------------------------------------------
change Protection mode from Maximum Protection to Maximum Performance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
We can not change protection mode from maximum protection to maximum performance. First we have to change to maximum availablity and then only to maximum performance.
Hope this helps !!!!
Find Archivelog GAP in Dataguard
select MAX(SEQUENCE#) from v$archived_log where ARCHIVED='YES';
select MAX(SEQUENCE#) from v$archived_log where APPLIED='YES';
Subscribe to:
Posts (Atom)