Pages

Tuesday, March 5, 2013

How to check RECOVER MANAGED STANDBY DATABASE real time apply?



### On Standby: Delayed apply or Real time apply?


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DELAY 60 disconnect; -- apply delayed for 60 minutes.

Database altered.

SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS;

RECOVERY_MODE
-----------------------
MANAGED
IDLE
IDLE
IDLE
...


SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE disconnect; -- Realtime apply

Database altered.

SQL> SELECT RECOVERY_MODE FROM V$ARCHIVE_DEST_STATUS; 

RECOVERY_MODE
-----------------------
MANAGED REAL TIME APPLY
IDLE
IDLE
IDLE
...



-- no time delay
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT; 

-- no time delay
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE NODELAY DISCONNECT;

-- 60 minutes delay
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DELAY 60 DISCONNECT;

-- real time apply
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;


--- Note: -----------------------------------------------------------------------------------

By default, apply services wait for the full archived redo log file to arrive on the standby database before applying it to the standby database.

If the real-time apply feature is enabled, apply services can apply redo data as it is received, without waiting for the current standby redo log file to be archived.





Saturday, February 23, 2013

ORA-39083 ORA-02063 Object type VIEW failed to create with error


ORA-39083: Object type VIEW failed to create with error:
ORA-02063: preceding 5 lines from HSBC26

face above error during impdp? this means your impdp tries to import the statistics to an remote database through an dblink.


Solution:

exclude=STATISTICS while expdp or impdp

or

set HS_FDS_SUPPORT_STATISTICS=FALSE in the init.ora

Note: In my case, I hit this error, when impdp is trying to create a view, which has a base table on remote database. 


impdp log snippet:

Failing sql is:
CREATE  FORCE VIEW "PLOANS"."CLIENT_TYPE" ("ITEM_CODE") AS select "SYMBOL_CODE" from  CUST_001.CLIENT_SUMMARY@HSBC26

ORA-39083: Object type VIEW failed to create with error:
ORA-02063: preceding 5 lines from HSBC26