0

I am trying to connect to Autonomous database from kubernetes cluster.

In my shell script I am giving the syntax as sqlplus admin/pwd@adb_low.

Before this, I also download the wallet. Can anyone tell me whether or not there is anything wrong here, as it produces the error

ORA-12154:TNS:could not resolve the connect identifier specified. 
Enter user-name, invalid option.
NickS1
  • 496
  • 1
  • 6
  • 19
Meenal
  • 105
  • 3
  • 17
  • [ORA-12154 could not resolve the connect identifier specified](https://stackoverflow.com/questions/7957955/ora-12154-could-not-resolve-the-connect-identifier-specified) ? – Luuk Oct 08 '22 at 12:17
  • @Luuk: I have tried all the options mentioned in the post but it didn't work maybe it is because I am downloading wallet and have to connect to autonomous db from k8s pod. – Meenal Oct 08 '22 at 13:13
  • Yes, maybe it is..... – Luuk Oct 08 '22 at 13:16
  • Can anyone guide on the steps of how to check whether wallet is properly downloaded – Meenal Oct 08 '22 at 13:20
  • Any recent browser does check if the download completes successfully. The question remain if you installed it correctly. – Luuk Oct 08 '22 at 15:08
  • You should check the output for `TNSPING adb_low`. My Oracle knowledge is not good enough to help you any further. The docs has a pages describing this, see: https://docs.oracle.com/cd/E11882_01/network.112/e41945/connect.htm#NETAG378 ) – Luuk Oct 08 '22 at 15:25
  • That error indicates it is not able to find the connection description for adb_low in the file tnsnames.ora. What is your database name? I assume it is not "adb"? – Yasin B Oct 10 '22 at 14:31

2 Answers2

0

Edit the sqlnet.ora file, by replacing ?/network/admin with the name of the folder containing the Autonomous database wallet credentials.

Set the TNS_ADMIN environment variable to the directory where the Autonomous database wallet is unzipped, for example:

export TNS_ADMIN=/home/myDBwallet
Antoine
  • 1,393
  • 4
  • 20
  • 26
0

We will use the mTLS wallet.

  1. Change the database admin password and make sure it doesnt end with letters, special characters and doesnt include @ symbol, have them in the middle such as '123Pass45'.
  2. You need to download the instant client basic and sql*plus.
  3. Extract all of them and put the extracted content of sqlplus into instant client basic extracted folders.
  4. Rotate(just in case) and download the wallet.
  5. In instant client basic, copy and paste the extracted content of the wallet into the network/admin folder.
  • In the wallet, you will see that sqlnet.ora includes the default wallet location which is (DIRECTORY="?/network/admin". You can change it if you want as long as it points to the wallet contents. Just leave it as default for now.
  • tnsnames.ora contains the service names mapped to the database service info such as the server's host name, port number, and database instance name. Meaning you can use the tns name (mydatabasename_high etc) to connect instead of the long connection string
  1. To connect: ./sqlplus admin/123Pass45@tnsname
  2. Thats it. It should be working. Let me know if it doesnt it.

Edit: to use step 6, open the terminal in the instant client basic folder where you pasted the sqlplus extracted contents. Alternatively, you can do path/sqlplus admin...

Israel Ndou
  • 151
  • 1
  • 6