Data Guard switchover fails with ORA-1031 when using wallets (Doc ID 1405343.1)

Last updated on JUNE 12, 2014

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.5 to 11.2.0.3 [Release 10.2 to 11.2]
Information in this document applies to any platform.

Symptoms

Data Guard configuration using wallets to connect to the database passwordless.

PRIMARY : ORLANDO
STANDBY : MIAMI

Wallet was setup correctly and both sqlplus and dgmgrl connections are successful, however when trying to perform a switchover using the DG broker it fails with ORA-1031 when the broker tries to connect :

dgmgrl /@ORLANDO_DG

DGMGRL> switchover to 'MIAMI'
Performing switchover NOW, please wait...
New primary database "MIAMI" is opening...
Operation requires shutdown of instance "ORLANDO1" on database "ORLANDO"
Shutting down instance "ORLANDO1"...
ORA-01031: insufficient privileges

Warning: You are no longer connected to ORACLE.

Please complete the following steps to finish switchover:
shut down instance "ORLANDO1" of database "ORLANDO"
start up and mount instance "ORLANDO1" of database "ORLANDO"

Changes

There are no additional changes other than the fact that wallets are used, and they are configured correctly.

The credentials for the primary and standby databases are created (added to the wallet).

Wallet location: /home/oracle/wallet

mkdir -p /home/oracle/wallet

mkstore -wrl /home/oracle/wallet/ -create
Enter wallet password: welcome1

mkstore -wrl /home/oracle/wallet/ -createCredential MIAMI_DG sys change_on_install
mkstore -wrl /home/oracle/wallet/ -createCredential ORLANDO_DG sys change_on_install

Wallet information is shown correctly :
mkstore -wrl /home/oracle/wallet -viewEntry oracle.security.client.connect_string1
mkstore -wrl /home/oracle/wallet -viewEntry oracle.security.client.username1
mkstore -wrl /home/oracle/wallet -viewEntry oracle.security.client.password1

mkstore -wrl /home/oracle/wallet -viewEntry oracle.security.client.connect_string2
mkstore -wrl /home/oracle/wallet -viewEntry oracle.security.client.username2
mkstore -wrl /home/oracle/wallet -viewEntry oracle.security.client.password2

Oracle Net config files are also setup correctly:
sqlnet.ora
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
WALLET_LOCATION =
(SOURCE=(METHOD=FILE)
(METHOD_DATA=(DIRECTORY=/home/oracle/wallet/))
)
SQLNET.WALLET_OVERRIDE = TRUE

listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = MIAMI_dgmgrl)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(SID_NAME = MIA1)
)
(SID_DESC =
(GLOBAL_DBNAME = ORLANDO_dgmgrl)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0)
(SID_NAME = ORL1)
)
)

tnsnames.ora
MIAMI =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = miami-scan)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = MIAMI))
)

ORLANDO =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orlando-scan)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORLANDO))
)

MIAMI_DG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = miami_host)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MIAMI))
)

ORLANDO_DG =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orlando_host)(PORT = 1521))
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = ORLANDO))
)


Testing passwordless connection using wallets:
sqlplus /@MIAMI_DG as sysdba
sqlplus /@ORLANDO_DG as sysdba
dgmgrl /@MIAMI_DG
dgmgrl /@ORLANDO_DG


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms