Monday, May 12, 2014

ORA-01031: insufficient privileges

Error: ORA-01031: insufficient privileges

Details: Occurred when attempting to shutdown the database using SHUTDOWN ABORT while logged in as oracle user.

Solution:
The solution was quite simple: exit sqlplus and login again as sysdba

Sunday, May 11, 2014

ORA-12537: TNS:connection closed - standby error in DGMGRL

Error: ORA-12537: TNS:connection closed

Details: Occurred on a standby database after switchover from primary to standby. Error came up when checking DataGuard broker configuration.

Cause: The mrp process not running on standby
Solution:
Checked if MRP process was running on standby by executing:
ps -ef | grep mrp
Nothing was running.
Performing regular maintenance on standby database fixed the issue
SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP NOMOUNT;
SQL> ALTER DATABASE MOUNT STANDBY DATABASE;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION; 

Thursday, May 8, 2014

Warning: ORA-16826: apply service state is inconsistent with the DelayMins property

Error: Warning: ORA-16826: apply service state is inconsistent with the DelayMins property

Details: Gotten this warning after switching over from primary to standby. All redo logs were applied and no errors showed up in alert log, but DataGuard shown the warning in standby

Cause:
Solution:
When I executed:
SELECT DEST_NAME,DATABASE_MODE,RECOVERY_MODE,PROTECTION_MODE,STATUS FROM V$ARCHIVE_DEST_STATUS
WHERE DATABASE_MODE='MOUNTED-STANDBY';
I'd get:
--------------------------------------------------------------------------
DEST_NAME           DATABASE_MODE   RECOVERY_MODE           PROTECTION_MODE      STATUS
--------------- ----------------------- -------------------- --------------
LOG_ARCHIVE_DEST_3  MOUNTED-STANDBY    MANAGED               MAXIMUM AVAILABILITY VALID
So RECOVERY_MODE came up as "MANAGED", meanwhile it should have been "MANAGED REAL TIME APPLY". Restarting MRP, as it was suggested by every source I could find, did not help and the next solution was to do that with NODELAY keyword:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY;
That did not help either. I waited until next logfile switch but the warning was still there. Finally I decided to remove the standby database and then re-add and re-enable it but gotten an error on the attempt to remove it:
DGMGRL> remove database 'Stby';
Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode So my last resort was to disable and re-enable Data Broker configuration:
DGMGRL>disable configuration;

DGMDRL>enable configuration;
Then
DGMGRL>show configuration;
finally returned SUCCESS.