Oracle configuration file

Source: Internet
Author: User
Tags lightweight directory access protocol ldap sqlplus

Under the Oracle installation directory $home/network/admin, you often see Sqlnet.ora Tnsnames.ora Listener.ora these three files, in addition to Tnsnames.ora, the other two files detailed use many people do not understand. 1. Sqlnet.ora is used on the Oracle client side to configure the relevant parameters of the connection server Oracle. 2. Tnsnames.ora used on the Oracle client side, the user configures the alias parameters of the connection database, just like the hosts file in the system. 3. Listener.ora is used on the Oracle server side to configure the monitoring methods of Oracle service-side programs, such as restricting certain IP parameters. Under the installation directory $home/network/admin/samples, you will see a sample file, such as the previous file, there will be a description of the relevant parameters and usage, if you encounter any problems, you can compare these sample files in the relevant parameters of the description to resolve. If there is a connection to the database, in order to ensure that the network is normal, without firewall interference, the steps to find the problem is: 1) in the client sequence check Sqlnet.ora,tnsnames.ora is a problem. 2) Check the Listener.ora configuration on the server side and ensure that the listener starts and the database service loads. 1. Understanding Sqlnet.ora  Below only a few common parameter configuration, detailed information, you can see the example Sqlnet.ora get. Sqlnet.ora can be removed so that when the Oracle client connects to the database, the configuration in Tnsnames.ora is used by default. 1). NAMES. Default_domain domain definition, when you use Sqlplus to access the database, you will add the ". Domain" example after the TNS alias: Sqlnet.ora: NAMES. The TNS definitions in Default_domain=comtnsnames.ora are as follows: Local_dev =    (DESCRIPTION =      (ADDRESS = ( PROTOCOL = TCP) (HOST = 192.168.1.111) (PORT = 1521))           (connect_data =        (SERVER = dedicated)       (service_name = linuxdb)    )) Execute command on client: Sqlplus username/[email& Nbsp;protected]_dev[/email], the following error message appears: "Ora-12154:tns: Unable to process service name" or "Ora-12154:tns:could not resolve service name" Such an error message. Because Sqlplus Username/[email protected]_dev[/email], the TNS alias "Local_dev" was converted to "local_dev.com", so Local_ Dev.com in the Tnsnames.ora can not find, the error. The definitions in modify Tnsnames.ora are as follows: local_dev.com =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = TCP) (HOST = 192 .168.1.111) (PORT = 1521))           (Connect_datA =        (SERVER = dedicated)       (service_name = linuxdb)    ) and execute Sqlplus [Email=username/[email protected]_dev]username/[email protected]_dev[/email], the connection is successful. 2) NAMES. Directory_path defines what type of match to use when the client connects to the database. Example Sqlnet.ora content is as follows: NAMES. Directory_path= (TNSNames, Onames, HOSTNAME) then execute sqlplus  username/[email protected]_dev[/email on the client side] When connecting the database, the first is to use Tnsnames.ora alias Configuration connection database, if not connected to the Onames to parse, and finally use the host name to parse. Onames indicates that Oracle uses its own name server (Oracle name servers) to resolve, and currently Oracle recommends using Lightweight Directory Access Protocol LDAP to replace Onames; Hostname means to use the host file, Dns,nis and so on to parse; 3) sqlnet. Authentication_services defines the authentication method for the login database. None represents Oracle database authentication, and NTS represents operating system authentication, which can be used in two ways.   can be set to sqlnet.authentication_services= (none,nts) in order to indicate the priority of validation. Example Sqlnet.ora content is as follows: Sqlnet. Authentication_services= (NONE) executes the following command on the command line: Sqlplus "/As SYSDBA" when execution fails. Tip Error Message Ora-01031:insufficient Privileges This parameter is not set by default.    2. Understanding Tnsnames.oraProvides details of a client connection to a database, host address, port, database instance name, and so on. An example is given below to illustrate the problem: Local_dev = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.111) (PORT = 1521)) ( Connect_data = (Server = dedicated) (service_name = linuxdb))) The protocol parameter is typically TCP, and you can choose a configuration method based on the server condition. Host is generally an IP address, it can also be the hostname, the host name as long as you can use ping hostname on the line, generally on the client system's host file with the hostname and IP address mapping relationship. The port standard is 1521, depending on the server-side listening port. SERVICE_NAME is the database service name, with the system user Login,sqlplus> show parameter service_name command to view. 3. Understanding Listener.oraThe  tnslsnr process is a listening process that listens and accepts remote connection database requests, Listener.ora is the configuration file for the Tnslsnr process, and the parameters for listening are read from the configuration file. The file is located on the server side, and if only the Oracle client is installed, this file does not normally exist. If you only need to connect to the database locally and do not accept remote connections, then you do not need to start the Tnslsnr process, and you do not need to maintain the Listener.ora file. The command to start the listening process, in command mode, executes the LSNRCTL start command to start the listening process Tnslsnr. Listening can be multiple, that is, you can listen to multiple Oracle instances at the same time, and you can define multiple listeners in Listener.ora to listen. Here's a simple example of what's in Listener.ora: LISTENER_CSB =  (description_list =    (DESCRIPTION =      ( Address_list =        (ADDRESS = (PROTOCOL = TCP) (HOST = 10.70.9.14) (PORT = 1621))       )    )  ) SID_LIST_LISTENER_CSB =  (sid_list =    (sid_desc =      (oracle_ho ME =/u02/oracle/app/oracle/product/10.2.0/db)       (sid_name = ZJDEVCSB)    )  ) ######### ################################### #LISTENER_CSA =  (description_list =    (DESCRIPTION =      (address_list =        (ADDRESS = (PROTOCOL = TCP) (HOST = 10.70.9.14) (PORT = 1521)) &NBSp        )  ) SID_LIST_LISTENER_CSA =  (sid_list =    (sid_desc =    &nbs P (Oracle_home =/u02/oracle/app/oracle/product/10.2.0/db)       (sid_name = ZJDEVCSA)    )   ) on top: 1). LISTENER_CSB,LISTENER_CSA defines the listener's two listener names, and the two listeners ' listening parameters: Ip,port, etc. 2). SID_LIST_LISTENER_CSB,SID_LIST_LISTENER_CSA defines two listening services, the service name format Sid_list_<lsnrname>,lsnrname is the name of the two listeners above, A service that specifies that the service will be accepted will be submitted to that listener, and the listener instance name ZJDEVCSB,ZJDEVCSA is the corresponding service_name parameter that needs to be specified in the Tnsnames.ora.  

Oracle configuration file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.