Month: September 2017

Oracle Data Guard Snapshot Standby with Flashback Off – where is my flashback?

No you don’t have to turn flashback database on to use a data guarded snapshot standby… but does it still use flashback logs? Yes by default when you convert a physical standby to a snapshot standby, flashback is turned on automatically.  Flashback will be OMF based and Oracle puts flashback logs in the FRA, and …

Oracle Data Guard Snapshot Standby with Flashback Off – where is my flashback? Read More »

So you need a little data about how much archivelog your DB is producing?

Here is a query that will give you the last 24 hour summary. select to_char(first_time,’dd-mon-yy’) In_Day, round(sum(blocks*block_size)/1024/1024/1024,2) Total_GB_Archived, count(*) Num_of_Archs, round(sum(blocks*block_size)/1024/1024/count(*),2) Avg_MB_Per_Arch from v$archived_log where first_time>sysdate-1 group by to_char(first_time,’dd-mon-yy’) order by to_char(first_time,’dd-mon-yy’); Need to see the hourly archivelog data? — want to see archivelog data by the hour select to_char(first_time,’dd-mon-yy hh24′) InHour, round(sum(blocks*block_size)/1024/1024/1024,1) Total_GB_Archived, count(*) …

So you need a little data about how much archivelog your DB is producing? Read More »

Using Oracle Snapshot Standby 11g and forward – using automatic restore points

New 11g feature (not sure if this came out in 11gR1 or 11gR2) – but it doesn’t get any easier… or should I say it used to be a lot harder. This feature creates a “guaranteed restore point” and generates flashback logs – whether flashback database is on or not to do the flashback.  So …

Using Oracle Snapshot Standby 11g and forward – using automatic restore points Read More »

12.1 Oracle Data Guard Related Views

Per https://docs.oracle.com/database/121/SBYDB/views.htm#SBYDB01300 Views Relevant to Oracle Data Guard There are a number of views that are especially useful when monitoring an Oracle Data Guard environment. Table 19-1 describes the views and indicates if a view applies to physical standby databases, logical standby databases, snapshot standby databases, or primary databases. See Oracle Database Reference for complete information about views. Table …

12.1 Oracle Data Guard Related Views Read More »

Want to change your vi or vim color schemes to get rid of the dark blue comments

BTW – before I get started on “colorscheme” something that irks me – vi or vim highlights your last matching search words… to turn off the highlighting either search for something that does not exist or :nohlsearch or easier yet :noh Now back to colorschemes in vi… vi junk :colorscheme desert # the command colorscheme …

Want to change your vi or vim color schemes to get rid of the dark blue comments Read More »

Check Data Guard lag

Well there are a quite a few ways – here are some of them. Check to see if applied archive sequence is equal on the primary and standby – run this query from both sides select sequence#, applied from v$archived_log order by sequence#; select * from v$dataguard_stats;  — works best from standby — gross numbers …

Check Data Guard lag Read More »

When performing a dataguard role transition by manual switchover with sqlplus make sure dest_2 on the standby that will be converted to a primary has a dest_2

Work in progress… testing Lots of stuff about role transition from Oracle Oracle Best Practices Doc ALTER SYSTEM SET FAL_SERVER=GGSTBY; Oracle Documentation on Role Transitions My primary is GGTARGET and standby is GGSTBY Primary *.log_archive_dest_2=’service=”ggstby”‘,’ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name=”ggstby” net_timeout=30′,’valid_for=(online_logfile,all_roles)’ *.log_archive_dest_state_2=’ENABLE’ Standby # probably don’t want the dest_2 on the standby …

When performing a dataguard role transition by manual switchover with sqlplus make sure dest_2 on the standby that will be converted to a primary has a dest_2 Read More »