I need to connect to our front-end database through sqlplus. Here's the information for connecting:
username: user001
password: password
IP Address: localhost
SID: dev
After connecting the admin server and then the app server, I tried to use sqlplus and then inputted the information for connecting the front-end database but it's not successful:
[admin-user@admin-host ~]$ cat sshapp
[admin-user@admin-host ~]$ ssh -L 50001:10.100.100.10:11 -L 50002:10.100.100.10:8003 -L 50003:10.100.100.10:8004 -L 50004:10.100.100.10:8005 -L 50005:10.100.100.10:8006 app-user@app-host
[admin-user@admin-host ~]$ ./sshapp
***************************************************************************
NOTICE TO USERS
This computer system is the private .....
***************************************************************************
app-user@app-host's password:
Last login: Fri Jun 26 14:21:33 2020 from admin-host.abc.edf
Authorized users only. All activity may be monitored and reported.
[app-user@app-host ~]$ sqlplus
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 26 14:27:58 2020
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter user-name: user001
Enter password:
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name:
Why does the error "ORA-12154: TNS:could not resolve the connect identifier specified" exist? How should I fix it for connecting the database?
---Additional information----
I don't know the path where my oracle client is installed... but I can type "sqlplus" for using SQL*Plus after connecting to app server.
[app-user@app-host ~]$ sql (type "sql" + tab)
sqlite3 sqlj sqlldr sqlplus
[app-user@app-host ~]$ pwd
/bd-user/home/app-user
---Updated on 30 June 2020---
Finally, this userid can be logged in through sqlplus after asking my client to resetting the password. We asked for changing the password because that userid was eventually locked. I am not sure if my client change other properties of that userid or not. As this userid could not be logged in through sqlplus but it could be logged in through Oracle SQL developer of other machine.
Apart form this userid, we also have different userid for connecting different front-end databases in the same app server. However, a few of userids can not be logged in through sqlplus (ERROR: ORA-12154: TNS:could not resolve the connect identifier specified) but they can be logged in through Oracle SQL developer of other machine.