Post

2 followers Follow
0
Avatar

configuration: ERR-11 / ORA-24327: need explicit attach before authenticating a user

Hi all,

probably not the first with this issue, but I can't see what is wrong. This is the log:


Network configuration files were detected on this system in these locations:
/u01/app/oracle/product/12.1.0/dbhome_2/network/admin

(TNS_ADMIN) - Please enter TNS configuration directory for this machine: [/u01/app/oracle/product/12.1.0/dbhome_2/network/admin]

Step 1 - Describe databases
========================================
The first step is to describe databases used in the replication. There are usually two of them (source and target).

Store SYSDBA and DBA passwords? Passwords only required during setup and initialization? (yes/no) [yes]
Let's configure the database, describing it's type, connectivity, user names etc.

What type of database is this? (Oracle/MySQL/SQL Server/Oracle AWS RDS/CSV/Hadoop): [Oracle]

Please enter database TNS alias: [] soadb

.....

Connect to database SYSTEM@soadb failed with error ORA-24327: need explicit attach before authenticating a user.
Check database and listener are running. Check your TNS settings. Please check and/or update TNS_ADMIN in the DDC file to point to correct
tnsnames.ora location.
_FORCE_LD_PATH_ALL="NO"
_FORCE_LD_PATH_SYSDBA="NO"
TNS_ADMIN="/u01/app/oracle/product/12.1.0/dbhome_2/network/admin"
LD_LIBRARY_PATH="/tmp/par-oracle/cache-388dc02a07153078cbfbdef53b70738a8e8cb376"
PATH="/tmp/par-oracle/cache-388dc02a07153078cbfbdef53b70738a8e8cb376:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/us
r/sbin:/sbin"

When I perform a TNSPING I get results:

-bash-4.1$ tnsping soadb
TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 01-JUN-2016 13:06:38
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/12.1.0/dbhome_2/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SERVICE_N
AME = soadb)))
OK (10 msec)

I notice that the environment variables appear to be reset when I end the dbvisit configuration. I would like to show a Proof of Concept to my customer on short notice. CAn you please help me?

 

Patrick Sinke Answered

Official comment

Avatar

Try to physically connect using sqlplus to the database.

export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_2
export PATH=$ORACLE_HOME/bin:$PATH
export TNS_ADMIN="/u01/app/oracle/product/12.1.0/dbhome_2/network/admin" 
export LD_LIBRARY_PATH="/tmp/par-oracle/cache-388dc02a07153078cbfbdef53b70738a8e8cb376" 

sqlplus SYSTEM@soadb

 

If you get this ERROR:

ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

Your listener does not know the instance/service name you refer to in the tnsnames. Make sure to register the database to the listener?

 

lsnrctl status:

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 01-JUN-2016 15:23:17
Uptime 0 days 0 hr. 2 min. 33 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_2/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/soa-training/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost)(PORT=5501))(Security=(my_wallet_directory=/u01/app/oracle/admin/ustore/xdb_wallet))(Presentation=HTTP)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/product/12.1.0/dbhome_2/admin/soadb/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "soadb.oracle.com" has 1 instance(s).
Instance "soadb", status READY, has 1 handler(s) for this service...
Service "soadbXDB.oracle.com" has 1 instance(s).
Instance "soadb", status READY, has 1 handler(s) for this service...
Service "ustore" has 1 instance(s).
Instance "ustore", status READY, has 1 handler(s) for this service...
Service "ustoreXDB" has 1 instance(s).
Instance "ustore", status READY, has 1 handler(s) for this service...
The command completed successfully

 

The problem is in the domain:

Your tnsalias: (SERVICE_NAME = soadb)
Your listener: Service "soadb.oracle.com" has 1 instance(s).

Change your tns entry as follows:

SOADB = 
(DESCRIPTION = 
(ADDRESS_LIST = 
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521)) 
) 
(CONNECT_DATA = 
(SERVICE_NAME = soadb.oracle.com) 
) 
)

 

(ZD9396)

Charmaigne Bezuidenhout
Comment actions Permalink

Please sign in to leave a comment.

1 comment