0

I am in a unique situation where I need to test my server connectivity to Oracle databases however I do not have access to any account or password.

Reason why the connectivity needs to be tested is because many times there are multiple layers of firewalls between my servers and the database, and also particularly recently while trying to access RAC/Exadata databases we realized that doing a telnet on the "scan" IP range (which were the only range visible to me) was not enough and that there are underlying physical/virtual IPs that are actually used to connect which were blocked. If I can test connectivity I can at least confirm the database is accessible.

I thought about connecting using sqlplus test@DB, where "test" account doesn't actually exist. If I get a reply saying that incorrect username/password logon denied, then at least I know the database connectivity is working because at least it reached the database to perform authentication. But I have audit concerns (whether DBAs will think someone is trying to hack the system) and also whether there's an actual way or command to do this test.

Ronbear
  • 343
  • 5
  • 21

1 Answers1

1

like @OldProgrammer pointed out, this is pretty much an optimal case for tnsping from the command line

tnsping MY_SERVICE_NAME

Here's a good post showing the basic options. Oh, and I'm pretty sure the DBA's can still see the traffic if they want to.

Community
  • 1
  • 1
SlimsGhost
  • 2,849
  • 1
  • 10
  • 16
  • tnsping shows OK but I when I try to connect it fails which is my issue. From http://www.orafaq.com/wiki/Tnsping : TNSPING is a utility in the ORACLE HOME/bin directory used to test if a SQL*Net connect string can connect to a remote listener (check if the socket is reachable). Note: This utility only tests if the listener is available. It cannot tell if the databases behind the listener is up or not. – Ronbear Sep 22 '16 at 02:37
  • Why would he need to use TNSPING if he can try connect with wrong user_name/password ? – AlexSmet Sep 22 '16 at 05:47
  • you can use a bad login, but if you're testing connectivity, tnsping does that and pretty much only that. If you throw known-bad logins, you're exercising a security interface that you have no real reason to touch, and i can certainly think of scenarios where all those bad logins would have undesirable repercussions. Still, if you want to test something beyond simple network connectivity, I agree that tnsping won't be enough – SlimsGhost Sep 23 '16 at 14:27