Google
Information Storage and Retrieval: All about TNS and Making a connection request to an Oracle Database

Pages

Saturday, July 30, 2011

All about TNS and Making a connection request to an Oracle Database

What happens when an Oracle client issues a request to connect to a database e.g

sqlplus scott/tiger@ora10g.localdomain

Here SQLPLUS is the client program, scott/tiger is the username/password and ora10g.localdomain is a TNS service name. TNS stans for Transparent Network Substrate and is a foundation software built into Oracle client to handle remote connections and allowing peer-to-peer communication. The TNS connection string tells the Oracle software how to connect to the remote database. Generally, the client software will read a configuration file "tnsnames.ora" which contains the details such as hostname, port number and the service name of the database on the host to which we wish to connect. A sample TNS entry:


gaurav_ora =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ora10g)
    )
  )

Here host machine is localhost and "ora10g" is the database service name. 1521 is the port number on which a "TNS listener" process will accept connections.

So now, our client software knows where to connect to. It will open a TCP/IP socket connection to the server with the hostname localhost on port 1521. The TNS Listener process inspects this request and using its own configuration file either accepts or rejects the request.

9 comments:

Anonymous said...

Great blog here! Also your web site loads up fast!
What host are you using? Can I get your affiliate link to your
host? I wish my site loaded up as quickly as yours lol

my web site :: how to calculate bmr

Anonymous said...

Paragraph writing is also a excitement, if you know then you can write otherwise it
is complex to write.

Feel free to visit my web page: softeclipse

Anonymous said...

Excellent blog here! Also your web site loads up very fast!

What web host are you using? Can I get your affiliate link to your host?
I wish my web site loaded up as fast as yours lol

My site - help online with medical problems

Anonymous said...

Every weekend i used to pay a quick viait thks site, because i want enjoyment, for the
reason that this this website conaations actually goood funny stuff too.


My website ...iron force hack tool

Anonymous said...

Do you mind if I quote a few of your posts as long as I
provide credit and sources back to your webpage? My website is
in the very same area of interest as yours and
my users would truly benefit from a lot of the information you
provide here. Please let me know if this okay with you.
Thanks!

My homepage - sewer cleaning Chandler

Anonymous said...

Aceste dansatori minunate s-au transformat dans pol într-o forma de arta .

Un alt artistbritanic celebritate și sex simbolul Diana Dors , care este apelul bingo pentru suma de 44 căutarea unor sfaturi naturale rapide de pierdere in greutate ?


Have a look at my homepage ... betterhammer978soa.wix.com ()

Anonymous said...

Wow, this article is pleasant, my sister is analyzing such things,
thus I am going to inform her.

Here is my web page: porno cam

Anonymous said...

Very nice post. I just stumbled upon your
blog and wished to say that I've really enjoyed browsing your blog posts.
After all I will be subscribing to your feed and I hope you write again soon!

Have a look at my weblog ... Amino Muscle

yanmaneee said...

yeezy 500
nike air max
hermes bags
nike air max 270
moncler coat
yeezy shoes
hermes online
yeezy shoes
westbrook shoes
kevin durant shoes