Not Another Standby Monitoring Script

I know what you are thinking. Not another standby monitoring script, right?

There’s plenty of them out there already and what makes this one any different?

You are probably correct and there’s probably nothing different about this.

Having to work with environments that are inconsistent such as manual standby, dataguard without broker, dataguard with broker,
I have been obsessed to create standby SQL which can accommodate any environment and can be run from primary or (more...)

Bad to crosscheck archivelog all

Typically, it’s not a good idea to have “crosscheck archivelog all;” in backup scripts and

even worse to have “delete expired archivelog all;” since any evidence will be eradicated.

$ rman target /

Recovery Manager: Release - Production on Thu Jan 28 14:17:35 2016

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: HAWK (DBID=3130551611)

RMAN> list archivelog all;

using target database control file  (more...)

Checksum entire directory using md5sum

When you are backing up 3.5+ TB database, resulting in 600+ GB backupset, transferring to new DC, you would want to ensure there are no corruptions resulting from transfer.

Here is an example of how to perform checkum using md5sum for all the contents in the directory.

Taking the process further, split the .md5 file into multiple files for parallel processing.

$ md5sum *MIG* > backup.md5

$ cat backup.md5
080adb9ba716f3bf6f91efb06adc311e   (more...)

Why use KEEP backup?

Question I which may have been asked.

For 1 time backup to migrate/clone database, KEEP backup does not affect retention policy and not backed up 1 times clause.

Image the consequences for deleting 1 off backup which has archivelog backup and the main scripts use not backed up 1-2 times clause.

RMAN> list archivelog all;

using target database control file instead of recovery catalog
List of Archived Log Copies for database with db_unique_name HAWKLAS

Key     Thrd  (more...)

Unsolved Case for Missing archived_log Backup

The project was to migrate database from one DC to another.

The decision we made was to perform RMAN KEEP backup so it does not interfere with existing retention policy.

Backup also resides in its own separate directory for easier checksum and transfer.

This is for 4 nodes RAC environment and backup was taken from node1 at 2016-JAN-21 14:12:10

RMAN backup scripts.

run {

Validate DG Broker Config for Switchover

Primary and Standby databases are running on the same server using OMF with listening on port 1530/1531

Note I have – TraceLevel = ‘SUPPORT’

+++ Check listener for DGMGRL service from PRIMARY and STANDBY.

$ lsnrctl status listener_las|grep DG -A 1
Service "hawklas_DGB" has 1 instance(s).
  Instance "hawklas", status READY, has 1 handler(s) for this service...
Service "hawklas_DGMGRL" has 1 instance(s).
  Instance "hawklas", status UNKNOWN, has 1 handler(s) for this service...

$ lsnrctl  (more...)

ORA-12514: TNS:listener during switchover using DGMGRL

Not sure what I am doing wrong because DEFAULT StaticConnectIdentifier does not seem to work.

Google and MOS were not much help.

Using StaticConnectIdentifier as created by dmgrl would fail with the following error during switchover.
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

The error can be found in the listener.log

When using tnsnames for StaticConnectIdentifier, switchover works like a charm.

I keep thinking, there must be something wrong (more...)

How Reliable is v$archive_dest_status?


Any DG Experts out there who knows more about the reliability for v$archive_dest_status as it has been many years since I have written scripts to monitor DG.

Don’t want to reinvent the wheel if I cannot make it better.

Note: gap_status is only available from 11gR2 +++

SQL*Plus: Release Production on Sun Jan 10 11:06:55 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g  (more...)

ORA-01652: unable to extend temp segment even with Autoextend ON

I have encountered a very strange feature and wondering if anyone has experienced this.

Tracing was enabled for “ORA-01652: unable to extend temp segment” using alter system set events ‘1652 trace name errorstack level 1’;.

The tablespace is configured to autotextend by 64MB with max size 31GB and currently has 4MB Free.

“create index x on abc(txt) tablespace users;” failed with ORA-01652: unable to extend temp segment by 128 in tablespace USERS.

I understand objects (more...)

Patching with OPLAN

From a time far, far way, I tweeted about Oracle Software Patching with OPLAN (Doc ID 1306814.1) and decided to give it a try.

First, you will need to configure X11 else error:
Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable.

Second, you will need to using OPatch Version:, else error:
Caught exception: java.lang.ExceptionInInitializerError

If you like to see (more...)