Not able to login by SSO in oracle database when i set TNS_ADMIN parameter

1k views Asked by At

I have my single sign on activated on oracle database D1 and other oracle database D2 which has password login method. I don't want to use oracle home Tnsnames.ora file. I created my own tnsnames.ora and added the both the databases.

I set TNS_ADMIN as path under which I give path of location where I keep my tnsnames file.

I try to do sqlplus /@db1 in command prompt then it throws an error saying "invalid username /password" But when I use sqlplus /@db1 before tsetting TNS_ADMIN parameter, it takes my local tns file (I guess) and login properly.

Now after setting TNS_ADMIN, if I try sqlplus user/pass@DB2 this works properly as DB2 is accessed using password and SSO isn't activated on this server.

Issue is SSO login in SQLplus doesn't work when I set my TNS_ADMIN parameter, tns entries are correct as I use the same db1 which was before activating SSO.

Do I need to add some parameter in sqlnet.ora located at my tnsnsames file to activate my SSO or any special setting DBA do to activate SSO on user and tns so that I can also do the same to use my tnsnames.ora file.

Scenario

cmd > sqlplus /@db1 --Logs successfully

cmd> set TNS_ADMIN=path/tns (my tnsnames.ora file location)

cmd > sqlplus /@db1 --Logs successfully --Fails to login

cmd > sqlplus user/pass@DB2 --Logs successfully

Note that my tnsnames.ora is not changed and is kept original with connection use for db1 when it was password login.

We use Kerberos for this SSO login for oracle sqlnet file in oracle home path, we have set some parameters related to Kerberos such as Kerberos_CC_NAME, Kerberos_CONF, Kerberos_CONF_MIT parameters. I used the same in my sqlnet file but it didnt works.

1

There are 1 answers

2
Wernfried Domscheit On BEST ANSWER

You have to specify location of your wallet in sqlnet.ora file, see Profile Parameters (sqlnet.ora)

In case of problems edit your sqlnet.ora file and add these lines

TNSPING.TRACE_DIRECTORY = path (location where you like to get trace file)
TNSPING.TRACE_LEVEL = user

The trace file should provide more information what is going wrong.