Re: What's a quick simple way to test Oracle connectivity between client and database server?

From: Geoff Muldoon <>
Date: Mon, 3 Nov 2008 15:11:08 +1100
Message-ID: <>

Spin says...
> "Mark D Powell" <> wrote in message
> On Nov 1, 11:53 pm, "Spin" <> wrote:
> Try the tnsping utility: tnsping service_name
> The utility sends a message to listener specified by the tnsnames.ora
> file entry for the service_name listed on the command line and
> responds with ping type information.

> Is service_name a placeholder for something or do I literally type
> "service_name"?

On your client machine - in the tnsnames.ora file - you must have an entry (or entries if you want the client to be able to connect to more than one server or instance) which "describes" your server/instance to the client.

my_first_database =
    (ADDRESS =

      (PROTOCOL = TCP)
      (HOST =
      (PORT = 1521)

      (SERVICE_NAME = whatever_the_dba_called_it)     )

Yes, lower case entries in the above example are placeholders. HOST can be be defined using a DNS-enabled name or an IP address. PORT in my example is the usual default, SERVICE_NAME may or may not be a fully qualified name depending on the how your database administrator set up the server instance's listener. Often the entry name (my_first_database) and the SERVICE_NAME (whatever_the_dba_called_it) are the same, but they need not be.

Then from a command line prompt:
tnsping my_first_database

If the response is "OK" then the database instance is up, its listener is running, and your client installation should be able to connect to it with a valid username/password.

Geoff M Received on Sun Nov 02 2008 - 22:11:08 CST

Original text of this message