Thursday, 19 November 2015

Dataguard

step 1:
======
Check the number of gap between Last sequence Received and last sequence applied. if it gives any number check the MRP process is running.


SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied", (ARCH.SEQUENCE# - APPL.SEQUENCE#) "Difference"
          FROM
         (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
         (SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
         WHERE
         ARCH.THREAD# = APPL.THREAD#
          ORDER BY 1;




To check MRP process is running or not:

select process,client_process,status,thread#,sequence#,block#,blocks
from v$managed_standby;




To put database in recovery mode:

startup mount;
alter database recover managed standby database disconnect from session;



Wednesday, 4 November 2015

ORA-28003: password verification for the specified password failed

SQL> create user xyz identified by xxx;
create user xyz identified by xxx profile system
*
ERROR at line 1:
ORA-28003: password verification for the specified password failed
ORA-20002: Password same as or similar to user


SQL>select profile, resource_name, limit from dba_profiles where RESOURCE_NAME = 'PASSWORD_VERIFY_FUNCTION';
PROFILE                        RESOURCE_NAME                    LIMIT
------------------------------ -------------------------------- ----------------------------------------
DEFAULT                        PASSWORD_VERIFY_FUNCTION         VERIFY_FUNCTION_11G
MONITORING_PROFILE             PASSWORD_VERIFY_FUNCTION         VERIFY_FUNCTION_11G
SYSTEM                         PASSWORD_VERIFY_FUNCTION         VERIFY_FUNCTION_11G

SQL> alter profile system limit PASSWORD_VERIFY_FUNCTION null;

Profile altered.

SQL> create user xyz identified by xxxx ;

User created.

SQL> alter profile system limit PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION_11G;

Profile altered.