GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle
Go To First  |  Previous Question  |  Next Question 
 Oracle  |  Question 39 of 81    Print  
what is Difference between TSNNAMES.ORA & SQLNET.ORA & LISTENER.ORA

  
Total Answers and Comments: 1 Last Update: December 04, 2006     Asked by: hasanvtu 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Innila
 

Oracle uses all three files (tnsnames.ora, sqlnet.ora, listener.ora) for network configuration.

tnsnames.ora

A tnsnames.ora file maps net service names to connect descriptors.

In simple words, tnsnames.ora file provides the ability to reference oracle databases by a simple alias.

It can be found in the ORACLE_HOME/network/admin or ORACLE_HOME/net80/admin directory on the client. This file will also be present on the server if client style connections are used on the server itself.

The net service name thus becomes a (most likely shorter and more readable) alias for the somewhat cumbersome net service name.

 

In the following example, the «text» after the equal sign is the connect descriptor while the text before the equal sign (net_service_name) is the net service name.

net_service_name=

 (DESCRIPTION=

   (ADDRESS=(protocol_address_information))

   (CONNECT_DATA=

     (SERVICE_NAME=service_name)))

For example:

ORA10 =

  (DESCRIPTION = (ADDRESS_LIST =

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

    )

    (CONNECT_DATA =

      (SERVICE_NAME=ORA10)

    )

  )

 

sqlnet.ora

The sqlnet.ora file contains client side network configuration parameters.

 

The sqlnet.ora file enables you to:

  • Specify the client domain to append to unqualified names
  • Prioritize naming methods
  • Enable logging and tracing features
  • Route connections through specific processes
  • Configure parameters for external naming
  • Configure Oracle Advanced Security
  • Use protocol-specific parameters to restrict access to the database

It can be found in the ORACLE_HOME/network/admin or ORACLE_HOME/net80/admin directory on the client.

 

Here is an example of an sqlnet.ora file : 

# SQLNET.ORA Network Configuration File 

SQLNET.AUTHENTICATION_SERVICES= (NTS)

 

NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)

NAMES.DEFAULT_DOMAIN = WORLD

 

  

listener.ora

 

Listener.ora file consists of the listener configurations like,

  • Listener's name
  • Protocol addresses that it is accepting connection requests on
  • Services it is listening
  • Control parameters

By default, the listener.ora file is located in the $ORACLE_HOME/network/admin

 

A Sample Listener.ora file

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

      )

      (ADDRESS_LIST =

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

      )

    )

  )

Example:

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = C:Oracle)

      (PROGRAM = extproc)

    )

    (SID_DESC =

      (GLOBAL_DBNAME = ORCL.WORLD)

      (ORACLE_HOME = C:Oracle)

      (SID_NAME = ORCL)

    )

  )

 

 



Above answer was rated as good by the following members:
SkylarBentley
December 04, 2006 01:10:54   #1  
Innila Member Since: September 2006   Contribution: 135    

RE: what is Difference between TSNNAMES.ORA & SQLNET.O...

Oracle uses all three files (tnsnames.ora sqlnet.ora listener.ora) for network configuration.

tnsnames.ora

A tnsnames.ora file maps net service names to connect descriptors.

In simple words tnsnames.ora file provides the ability to reference oracle databases by a simple alias.

It can be found in the ORACLE_HOME/network/admin or ORACLE_HOME/net80/admin directory on the client. This file will also be present on the server if client style connections are used on the server itself.

The net service name thus becomes a (most likely shorter and more readable) alias for the somewhat cumbersome net service name.

In the following example the text after the equal sign is the connect descriptor while the text before the equal sign (net_service_name) is the net service name.

net_service_name

(DESCRIPTION

(ADDRESS (protocol_address_information))

(CONNECT_DATA

(SERVICE_NAME service_name)))

For example:

ORA10

(DESCRIPTION (ADDRESS_LIST

(ADDRESS (PROTOCOL TCP)(HOST somehost)(PORT 1521))

)

(CONNECT_DATA

(SERVICE_NAME ORA10)

)

)

sqlnet.ora

The sqlnet.ora file contains client side network configuration parameters.

The sqlnet.ora file enables you to:

  • Specify the client domain to append to unqualified names
  • Prioritize naming methods
  • Enable logging and tracing features
  • Route connections through specific processes
  • Configure parameters for external naming
  • Configure Oracle Advanced Security
  • Use protocol-specific parameters to restrict access to the database

It can be found in the ORACLE_HOME/network/admin or ORACLE_HOME/net80/admin directory on the client.

Here is an example of an sqlnet.ora file :

# SQLNET.ORA Network Configuration File

SQLNET.AUTHENTICATION_SERVICES (NTS)

NAMES.DIRECTORY_PATH (TNSNAMES ONAMES HOSTNAME)

NAMES.DEFAULT_DOMAIN WORLD

listener.ora

Listener.ora file consists of the listener configurations like

  • Listener's name
  • Protocol addresses that it is accepting connection requests on
  • Services it is listening
  • Control parameters

By default the listener.ora file is located in the $ORACLE_HOME/network/admin

A Sample Listener.ora file

LISTENER

(DESCRIPTION_LIST

(DESCRIPTION

(ADDRESS_LIST

(ADDRESS (PROTOCOL IPC)(KEY EXTPROC1))

)

(ADDRESS_LIST

(ADDRESS (PROTOCOL TCP)(HOST hostname)(PORT 1521))

)

)

)

Example:

SID_LIST_LISTENER

(SID_LIST

(SID_DESC

(SID_NAME PLSExtProc)

(ORACLE_HOME C:Oracle)

(PROGRAM extproc)

)

(SID_DESC

(GLOBAL_DBNAME ORCL.WORLD)

(ORACLE_HOME C:Oracle)

(SID_NAME ORCL)

)

)


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

Latest Answer : REF CURSOR - This cursor could be used for processing more than one SELECT query.                       NORMAL COUSIR - This cursor could be ...
Read Answers (11) | Asked by : SaratKumar

Latest Answer : 8i-materilized views, instead of triggers, support internet, granting of columns 9i-timestamp, rename of column, new datatypes, rank, dense_rank, 9i joins ...
Read Answers (9) | Asked by : Reddeppa

Latest Answer : Snapshot and materialized view are almost same same but with one difference.You can say that materialized view =snapshot + query rewrite functionalityquery rewrite functionality:In materialized view you can enable or disable query rewrite option. ...
Read Answers (6) | Asked by : pandish

Latest Answer : Index will only help you in searching the data but unique index will provide uniqueness to the indexed column. But in both the cases NULL values are allowed to insert. ...

Latest Answer : TRUNC and TRUNCATE are 2 different functions, above you mentioned only the TRUNC functiontruncate table will delete all records of the table ...
Read Answers (4) | Asked by : Josna

Latest Answer : Oracle uses all three files (tnsnames.ora, sqlnet.ora, listener.ora) for network configuration.tnsnames.ora A tnsnames.ora file maps net service names to connect descriptors. In simple words, tnsnames.ora file provides the ability to reference oracle ...
Read Answers (1) | Asked by : hasanvtu

What is the difference between Varray And Nested Table? 
Latest Answer : They are Oracle data types those who knoww any language like C and java then it is easy to understand the concept of Varray, as it is related to ARRAY structure of C or java language. where as Nested Table concept is related to Struct data type of ...

What is the difference between pair wise & non pair wise comparison in a multiple column subquery. In which case are these used? 
Latest Answer : In pair wise comparison we write like this:"where (MGR_ID, DEPT_ID) IN (SUBQUERY)"IN non pair wise comparison we write like this:"where (MGR_ID) IN (SUBQUERY)and (DEPT_ID) IN (SUBQUERY)"In first one we are checking two columns simultaneously ...

Query 1. SELECT sal FROM emp e WHERE sal < any (SELECT sal FROM empWHERE empno=e.mgr) (o/p:11 row) Query 2. SELECT SAL FROM emp e WHERE sal < any (SELECT sal FROM empWHERE mgr=e.empno) (o/p:1 
Latest Answer : how this query is possible i dont know, how the emp number and manager number will be same, i think the query in meaning less r am not understanding properly i dont know,,,, Let some one explain this...! ...

What is the main difference between the functions of DB_BUFFER_CACHE and LIBRARY_CACHE? 
Latest Answer : DB Buffer cache:  when a query is executed then server process looks for block in buffer cache. If the block is not available in buffer cache then server process reads the block from data files.Library cache:It contains the informations of most recently ...


 Sponsored Links

 
Related Articles

Querying Data with Oracle XQuery

Querying Data with Oracle XQuery Starting with Oracle Database 10g Release 2 you can take advantage of a full featured native XQuery engine integrated with the database With Oracle XQuery you can accomplish various tasks involved in developing PHP Oracle XML applications operating on any kind of dat
 

Using Oracle XML DB Repository

Using Oracle XML DB Repository Another variation on accessing and manipulating XML content stored in Oracle database is provided by Oracle XML DB repository which is an essential component of Oracle XML DB mosgoogle NOTE Oracle XML DB repository also known as XML repository is a hierarchically organ
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

XML Processing in PHP and Oracle Applications

Processing XML in PHP Oracle Applications As mentioned there are two alternatives when it comes to performing XML processing in your PHP Oracle application You can perform any required XML processing using either PHP s XML extensions or PEAR XML packages or Oracle s XML features mosgoogle In the fol
 

PHP Oracle Web Development

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax is a good starting b
 

Getting Started with Oracle and ODP.NET

ODP NET Developer&rsquo; s Guide by Jagadish Chatarji Pulakhandam Sunitha Paruchuri A practical guide for developers working with the Oracle Data Provider for NET and the Oracle Developer Tools for Visual Studio 2005 Application development with ODP NET Dealing with XML DB using ODP NET Oracle
 

PHP Oracle Web Development Review

PHP Oracle Web Development Data processing Security Caching XML Web Services and Ajax The book is written by Yuli Vaseliev a well known author of different web development and programming books The author is also an expert in open source technologies and SOA Service Oriented Architecture But besides
 

Step by Step Oracle PL-SQL Tutorial

This introductory tutorial to PL SQL will help you to understand the basic concepts of PL SQL Please review the following tutorials and practice the sample SQL Statements on your local Oracle Database Please note that you must learn these basic things before we actually start getting in to Advanced
 

Listening Skills - Master Listener

Master Listener What is Active Listening Every expert communicator already knows the importance of active listening Active listening includes the ability to perform such skills as paraphrasing mirroring and clarifying If you are already good at active listening then you realize that it is good to va
 

Listening Skills - Become a Better Listener

Listening Skills Become a Better Listener What does it mean to listen The vast majority of us will spend our lives relying on our listening skills No matter what our profession happens to be listening plays a key role in any communicative environment Like all other skills listening requires a lot of
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape