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

From: Geoff Muldoon <geoff.muldoon_at_trap.gmail.com>
Date: Mon, 3 Nov 2008 15:11:08 +1100
Message-ID: <MPG.237922f5416b3a469896ae@news.x-privat.org>


Spin says...
> "Mark D Powell" <Mark.Powell_at_eds.com> wrote in message
> news:ce947e1a-0877-4e46-a638-91d48e92e403_at_u29g2000pro.googlegroups.com...
> On Nov 1, 11:53 pm, "Spin" <S..._at_invalid.com> 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.

eg:
my_first_database =
  (DESCRIPTION =
    (ADDRESS =

      (PROTOCOL = TCP)
      (HOST = myserver.whereveritis.com)
      (PORT = 1521)

    )
    (CONNECT_DATA =
      (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