How to Copy ASM Password File From Primary to Standby

It is a prerequisite for both primary and secondary databases have same copy of password file, and stored in ASM diskgroup preferred

From 12.1.0.2 on, since primary database password file is stored in ASM, so it needs to be manually copied onto standby database ASM for dataguard configuration. Otherwise the below errors will occur:

*** 2017-09-06 14:34:29.216
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
ORA-01017: invalid username/password; logon denied
OCI_DBVER attribute value retrieval failed error=1017

*** 2017-09-06 14:34:30.323
OCISessionBegin failed. Error -1
.. Detailed OCI error val is 1017 and errmsg is 'ORA-01017: invalid username/password; logon denied
'
*** 2017-09-06 14:34:30.323737 4929 krsh.c
Error 1017 received logging on to the standby

Subscribe to get access

Read more of this content when you subscribe today.

Advertisement

How Long a Session Has been Idle or Inactive In Oracle Database ?

SQL to find how long a session has been ACTIVE or IDLE, very handy.

SYMPTOMS

There are up to one thousand sessions connected to Oracle Database from a Weblogic connection pool. User wanted to know how long those sessions have been idle ( INACTIVE), so the Weblogic connection pool can be reviewed and reconfigured properly.

SOLUTION

The below query can be run to meet this requirement:

SQL>select USERNAME,
           MACHINE,
           STATUS,
           LOGON_TIME,
           LAST_CALL_ET INACTIVE_SECONDS 
    from  gv$session 
    order by LAST_CALL_ET desc; 

USERNAME   MACHINE    STATUS    LOGON_TIME         INACTIVE_SECONDS
---------- ---------- -------   -----------------  ----------------
USERAPP    machine1  INACTIVE   20170917-17:04:17             3523
USERAPP    machine2  INACTIVE   20170918-02:57:03             2068
USERAPP    machine3  INACTIVE   20170917-17:52:09             1141
...
..
.
USERAPP    machine1 INACTIVE   20170917-17:17:01               176
USERAPP    machine1 I NACTIVE   20170917-17:17:01              176

REFERENCES

According to Oracle doc :

LAST_CALL_ETNUMBERIf the session STATUS is currently ACTIVE, then the value represents the elapsed time in seconds since the session has become active.If the session STATUS is currently INACTIVE, then the value represents the elapsed time in seconds since the session has become inactive.

The below query can also get the results as per Oracle Doc ID 365693.1.

SQL>select sid, seconds_in_wait 
      from v$session_wait
     where state='WAITING' 
       and event='SQL*Net message from client'
 order by seconds_in_wait desc;