listener.ora - sqlnet.ora - tnsnames.ora relationship and manual configuration example

2010-10-11  来源:本站原创  分类:Database  人气:211 

This is charly reprinted in a link on his BLOG
http://tiaolao.loveunix.cn/index.php/action/viewspace/itemid/93.html

====================
Tns said recently seen a lot of people can not log or database, and so on, to simply summarize the following documents.

Oracle is the first network structure, that can add to the complexity of encryption at, LDAP and more. . Not discussed here, focusing on the basic network structure is the most common situation we have three configuration files listener.ora, sqlnet.ora, tnsnames.ora, are placed in $ ORACLE_HOME \ network \ admin directory.

Focus: the role of the three documents and the use of #-----------------------

sqlnet.ora----- act like linux or other unix's nsswitch.conf file through this file to determine how to find a connection in the connection string appears,

For instance, the client input sqlplus sys / oracle @ orcl

If my sqlnet.ora is look like this SQLNET.AUTHENTICATION_SERVICES = (NTS)

NAMES.DIRECTORY_PATH = (TNSNAMES, HOSTNAME)

Then, the client will be the first in the tnsnames.ora file to find orcl records. If there is no corresponding record is trying to orcl as a host name, the way through the network to resolve its ip address to connect to the ip and then on the GLOBAL_DBNAME = orcl in this instance, of course, I'm not a host name orcl here, if I look like this NAMES.DIRECTORY_PATH = (TNSNAMES)

Then the client will only record from the tnsnames.ora orcl parentheses find there are other options, such as LDAP, are not commonly used.

#------------------------

Tnsnames.ora------ This file is similar to unix's hosts file, provided to the host name or ip tnsname correspondence, only when the sqlnet.ora in similar NAMES.DIRECTORY_PATH = (TNSNAMES) This is the client resolution order in the connection string TNSNAMES that will try to use the document.

Example, there are two, ORCL corresponding local, SALES corresponding IP address of another, inside also defines the use of primary server or shared server mode connection, a sentence that # you have to be connected when the input TNSNAME

ORCL =

(DESCRIPTION =

(ADDRESS_LIST =

# The following is the TNSNAME the corresponding host, port, protocol (ADDRESS = (PROTOCOL = TCP) (HOST = 127.0.0.1) (PORT = 1521))

)

(CONNECT_DATA =

# Use a dedicated server mode to connect to the server need to talk with pattern matching, if not the model # under the server automatically adjust the (SERVER = DEDICATED)

# Corresponding service_name, SQLPLUS> show parameter service_name;

# To view (SERVICE_NAME = orcl)

)

)

# The following similar SALES =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = sales)

)

)

#----------------------

We view the client over a server-side listener.ora------ listener listener configuration file on the listener process is not to say the process to accept applications for remote access to the database and transmitted to the oracle server process. So if not using a remote connection, listener process is not required, the same process if you turn off listener does not affect existing database connection.

Listener.ora file example # listener.ora Network Configuration File: # E: \ oracle \ product \ 10.1.0 \ Db_2 \ NETWORK \ ADMIN \ listener.ora

# Generated by Oracle configuration tools.

# The following defines the process for which instance of the LISTENER service # This is ORCL, and it corresponds to the ORACLE_HOME and GLOBAL_DBNAME

# Which is not required unless GLOBAL_DBNAME do database connection SID_LIST_LISTENER = HOSTNAME

(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = boway)

(ORACLE_HOME = E: \ oracle \ product \ 10.1.0 \ Db_2)

(SID_NAME = ORCL)

)

)

# Names of listeners, a database can have more than one listener is the listener # listen again following the protocol, ip, port, etc., used here tcp1521 port, and the # using a host name LISTENER =

(DESCRIPTION =

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

)

The above example is a simple example, but also the most common. A listener process to a instance (SID) to provide services.

Monitor the operation command $ ORACLE_HOME / bin / lsnrctl start, others, such as stop, status and so on. Qiao Wan after a specific look lsnrctl help.

The above mentioned three documents are available through graphical configuration tool to complete the configuration $ ORACLE_HOME / netca Wizard form of $ ORACLE_HOME / netmgr

I am more accustomed to netmgr,

sqlnet.ora configuration profile is a way that is, name resolution is the tnsnames.ora service name configuration file is listener.ora file configured listeners that the listener can be configured to process specific to try and look at the configuration file.

Thus the overall structure will have is that when you type sqlplus sys / oracle @ orcl time 1. Sqlnet.ora look at name resolution query, we found that a TNSNAME

2. The query tnsnames.ora file, the record from the inside looking orcl, and find the host name, port, and service_name

3. If the listener process is not a problem, the process of establishing a connection with the listener.

4. According to a different server models such as dedicated server mode or shared server mode, listener to take next action. The default is dedicated server mode, there is no problem if the client connected to the database server process.

5. This time the network connection has been established, listener process, the historical mission is finished.

#---------------

Commands used in the form of several connected 1.sqlplus / as sysdba This is a typical operating system authentication, no listener process 2.sqlplus sys / oracle This connection can only connect the unit database, the same process without listener 3. sqlplus sys / oracle @ orcl in this way requires listener process is available. The most common network connection.

Connection with the above or other sys user password file authentication by users do not need the database is available, the operating system authentication does not require a database available, the average user because it is database authentication, the database must be in the open state.

Then there #-------------

Troubleshooting may be normally used 1.lsnrctl status View the status of the server listener process LSNRCTL> help

The following operations are available

An asterisk (*) denotes a modifier or extended command:

start stop status

services version reload

save_config trace change_password

quit exit set *

show *

LSNRCTL> status

2.tnsping view the client sqlnet.ora and tnsname.ora file is configured correctly or not, and the corresponding state of the server listener process.

C: \> tnsping orcl

TNS Ping Utility for 32-bit Windows: Version 10.1.0.2.0 - Production on 16-8 March -

2005 09:36:08

Copyright (c) 1997, 2003, Oracle. All rights reserved.

Used parameter files:

E: \ oracle \ product \ 10.1.0 \ Db_2 \ network \ admin \ sqlnet.ora

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)

(HOST = 127.0.0.1) (PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_

NAME = orcl)))

OK (20 msec)

3.

SQL> show sga view instance is already started SQL> select open_mode from v $ database; view the database is open or mount state.

OPEN_MODE

----------

READ WRITE

#-----------------

Instead of using the hostname to access the database using the tnsname tnsname example is the default way to access the database, but it also brings point problem, and that is all you need to configure the client tnsnames.ora file. If your database server address changes, you need to re-edit the client file. There is no hostname to access the database through this trouble.

Need to modify the server side listener.ora

# Listener configuration file listener.ora

# Using the host naming the files do not need to be resolved locally tnsname.ora # listener.ora Network Configuration File: d: \ oracle \ product \ 10.1.0 \ db_1 \ NETWORK \ ADMIN \ listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

# (SID_NAME = PLSExtProc)

(SID_NAME = orcl)

(GLOBAL_DBNAME = boway)

(ORACLE_HOME = d: \ oracle \ product \ 10.1.0 \ db_1)

# (PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC))

)

(DESCRIPTION =

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

)

)

Sqlnet.ora client will not use TNSNAME access if confirmed, you can remove the TNSNAMES

# Sqlnet.ora Network Configuration File: d: \ oracle \ product \ 10.1.0 \ db_1 \ NETWORK \ ADMIN \ sqlnet.ora

# Generated by Oracle configuration tools.

SQLNET.AUTHENTICATION_SERVICES = (NTS)

NAMES.DIRECTORY_PATH = (HOSTNAME)

Tnsnames.ora configuration file does not need to delete it does not matter.

Here is the configuration of the network and operating system problems, how to resolve the problem of my host name that can be connected by the following sqlplus sys / oracle @ boway

In this case, this server will be connected boway and listener to determine what you want to connect the service_name.

Original Address http://bbs.loveunix.net/blog.php?tid=56050

相关文章
  • listener.ora - sqlnet.ora - tnsnames.ora relationship and manual configuration example 2010-10-11

    This is charly reprinted in a link on his BLOG http://tiaolao.loveunix.cn/index.php/action/viewspace/itemid/93.html ==================== Tns said recently seen a lot of people can not log or database, and so on, to simply summarize the following docu

  • oracle network configuration (listener.ora / sqlnet.ora / tnsnames.ora) 2010-04-05

    Quote Reprinted: http://zjf365.javaeye.com/blog/265450 oracle network configuration of three configuration files listener.ora, sqlnet.ora, tnsnames.ora, are placed in $ ORACLE_HOME \ network \ admin directory. 1. Sqlnet.ora----- effect similar to lin

  • Recognizing the sqlnet.ora tnsnames.ora listener.ora oracle three documents 2010-07-21

    An overview of the oracle installation directory $ HOME / network / admin, the, often see sqlnet.ora tnsnames.ora listener.ora these three documents, in addition to tnsnames.ora, the other two documents in detail the use of a lot of people do not und

  • Oracle listener.ora tnsnames.ora sqlnet.ora 2010-05-31

    in its most basic form, Oracle uses threes files (listneres.ora, tnsnames.ora, sqlnet.ora) for network configuration. 1 listener.ora. This file contains the server side parameters configuration 2 tnsnames.ora, sqlnet.ora this file contains the client

  • Three configuration files listener.ora. Sqlnet.ora. Tnsnames.ora 2011-07-25

    1. Sqlnet.ora----- effect similar to linux or other unix's nsswitch.conf file through this file to determine how to find a connection in the connection string there. For example, we enter a client sqlplus sys / oracle @ orcl If my sqlnet.ora looks li

  • oracle10g中关闭tnsnames.ora,sqlnet,listener.ora三个文... 2011-08-30

    安装oracle10g后,发现network/admin中的tnsnames.ora,sqlnet,listener.ora三个文件都会自动备份,过一会就会自动生成一个bak文件,请问哪里控制这个自动备份呢?如何关闭?谢谢! 最佳答案 安装oracle10g后,发现network/admin中的tnsnames.ora,sqlnet,listener.ora三个文件都会自动备份,过一会就会自动生成一个bak文件,请问哪里控制这个自动备份呢?如何关闭?谢谢! lsnrctl show save_c

  • listener.ora/sqlnet.ora/tnsnames.ora配置文件详解 2012-06-20

    归纳的很好,记之. oracle网络配置 三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下. 英文说明: The sqlnet.ora is an optional file expressing more parameters about the connection (eg: the trace level for debugging, the types of authenticat

  • Detailed listener.ora.sqlnet.ora.tnames.ora Oracle configuration files 2010-12-23

    Three configuration files listener.ora, sqlnet.ora, tnsnames.ora, are placed in $ oracle_home \ network \ admin directory. Focus: the role and use of the three documents sqlnet.ora----- act like linux or other unix's nsswitch.conf file through this f

  • Oracle10g configured tnsnames.ora and listener.ora method 2010-02-10

    File Location: oracle \ product \ 10.2.0 \ db_1 \ NETWORK \ ADMIN tnsnames.ora configuration server or local database EXTPROC_CONNECTION_DATA = \ \ install Oracle after the original configuration (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL =

  • Tnsnames.ora and listener.ora configuration methods Oracle10g 2010-11-04

    File Location: oracle \ product \ 10.2.0 \ db_1 \ NETWORK \ ADMIN tnsnames.ora configuration server or local database EXTPROC_CONNECTION_DATA = \ \ installed after the original configuration of Oracle (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOC

  • listener.ora和tnsnames.ora的配置 2013-07-10

    服务器上包含多个库时,listener.ora和tnsnames.ora的配置 1.配置内容: 1). listener.ora SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = D:\oracle\product\10.1.0\Db_1) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = orcl) (ORACLE_HOME = D:\o

  • [Change] tnsnames.ora Configuration Summary 2010-04-23

    listener.ora, sqlnet.ora, tnsnames.ora, are placed in $ ORACLE_HOME \ network \ admin directory. Focus: the role of the three documents and the use of #----------------------- sqlnet.ora----- effect similar to linux or other unix's nsswitch.conf file

  • Test tnsnames.ora inside configuration can resolve the client 2010-06-01

    In dos the following test: tnsnames.ora tnsping ORAS4.0_189 inside the configuration used to test the client can not resolve. Explained: tnsping fixed wording. ORAS4.0_189 name for the database

  • One thing to note tnsnames.ora TNS-03505: can not resolve name 2010-08-02

    SLAMPERF = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = ccmeph13.chn.hp.com) (PORT = 1531)) ) (CONNECT_DATA = (SID = SLAMPERF) ) ) SLAMPERF = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = ccmeph13.chn.hp.com

  • Oracle Enterprise Manager to use the failure-time analysis solutions to the tnsnames.ora file 2011-02-16

    Operating System: win7 32bit Database: Oracle 10g In Oracle 10g client installed, use the Oracle Enterprise Manager encountered the following error: Tnsnames.ora file failure analysis ServiceAliasException: 11 Exclude the tnsnames.ora file in the cas

  • oracle database connection file tnsnames.ora location 2011-07-05

    D: \ oracle \ product \ 10.2.0 \ db_1 \ network \ ADMIN \ tnsnames.ora

  • PL / SQL Developer to modify the tnsnames.ora configuration oracle 2011-09-20

    Now install the oracle version too, and often have to change the tnsnames.ora configuration file. According to the information available online, the easiest is to: In the environment variable to set the TNS_ADMIN entry path is to have the tnsnames.or

  • 浅析如何在tnsnames.ora中配置监听 2014-12-22

    以下是对如何在tnsnames.ora中配置监听进行了详细的分析介绍,需要的朋友可以过来参考下 tnsnames.ora所在位置:D:\Installed\oracle\product\11.1.0\db_1\NETWORK\ADMIN\tnsnames.ora也就是说在product中 只有配置了监听之后才可以登录到数据库中 TOTO = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 这里是IP地址)(PORT = 1521)) (CONN

  • 关于plsql developer 连 Oracle 的配置文件 tnsnames.ora 2012-04-26

    Oracle10g所在目录大概是: E:/oracle/product/10.2.0/db_1/NETWORK/ADMIN/tnsnames.ora Oracle9i所在目录大概是: D:/oracle/ora90/network/admin/tnsnames.ora 配置该文件,诸如: # TNSNAMES.ORA Network Configuration File: D:/oracle/ora90/network/admin/tnsnames.ora # Generated by Orac

  • Oracle 配置tnsnames.ora 文件 2014-05-18

    安装完成后请修改 tnsnames.ora 文件中用中文标识的三处. 原文: 修改成自己的配置名 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 服务器IP)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = 服务器服务名) ) ) 修改后: BSOFT = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =