I am not able to connect with other user except using sys as sysdba. I am giving an error ORA-12154
While tnsping is working and trace route is also working.
sqlplus [email protected]
Sqlplus 19.0.0.0.0
Enter password
Error
ORA -1254 :TNS could not resolve the connect identifier specified
But I am able to login to db using sysdba, but not other db user.
It appears you incorrectly transcribed the output instead of copying and pasting. The error code associated with ':TNS could not resolve the connect identifier specified' is ORA-12154, not 'ORA -1254'.
That said, the net is full of references to ORA-12154, including my own article on it, here.
In short, it could not resolve 'p7ru01.ab.com' to an actual connect string - host name or IP address, port number, and database service name. Either it couldn't find an entry for 'p7ru01.ab.com' in the tnsnames.ora file, or it could not locate a tnsnames.ora file.