Configuration of tnsnames and listenter files in Oracle

Source: Internet
Author: User

1. The Zhaoqing merchants alliance was tracked and asked if there were still problems with the Alliance, so as to respond promptly.

To reduce complaints.
2. Since the Oracle connection error was encountered again when the system was reinstalled yesterday, this section summarizes

Make a summary of the example name, database domain name, global database name, and service name,
Db_name:Database Name,This parameter is determined before data is created. After the database is created and modified, it must be configured

File, usually the Database Name and Instance name are in a one-to-one relationship.

In the server architecture (Oracle Real-time application cluster), the database name and Instance name are one-to-multiple relationships.
Db_domain: Database domain name, used to distinguish databases with the same name. The Database Name and domain name constitute a global

Database Name if two databases are created in a server program, there are two database names.

View Database Name: Select name from V $ database; PL/SQL is connected to the database name

Instance_name: database instance name,It can be the same as the database and must be consistent with oracle_sid,By default, SERVICE_NAME is equivalent to the Database Service name.

Select instance_name from V $ instance; the description of the database instance name sometimes uses the Instance name (instance_name) parameter, and sometimes uses the oracle_sid parameter. Both are database instance names

Instance_name is an Oracle database parameter. Oracle_sid is the environment variable of the operating system.

When ld_sid is used to interact with the operating system, that is, to access the Instance name from the operating system perspective

Must Pass oracle_sid
Service_names:Database Service nameIs the same as the global database name. If there is no domain name, the service name is

Is the database name.

Show parameter SERVICE_NAME

Listener. ora and tnsnames. ora, sqlnet. ora

Sid_list_listener =
(Sid_list =
(Sid_desc =
Global_dbname = CAMs) # Database Name

(Sid_name = plsextproc) database instance name

(ORACLE_HOME = F: \ Oracle10g)
(Program = EXTPROC)
)
)

 

Sqlnet. ora is used to configure the connection mode used for network connection.
Tnsnames. ora: It is set for the Oracle client to access the database, not for remote client connection.

The
Remotely connect to the database: the SERVICE_NAME value is required
The value of the sid_name parameter under the sid_desc item in the listener file is equal

Jcdb1 = -- 'name can be retrieved at will. In PLSQL, the database connection is changed. 'PLSQL. What is connected to sqlplus?Jcdb1
Network Service name (Database alias)
(Description =
(Address_list =
(Address = (Protocol = TCP) (host = 172.20.33.183) (Port = 1521 ))--
'Is consistent with that in the listener, where host indicates the name or IP address of the computer on the local machine and the corresponding socket

Info'
)
(CONNECT_DATA =
(SERVICE_NAME = jcdb) -- '9i new service name connection, corresponding server listening file SERVICE_NAME: on the server side

Global_dbname = jcdb, and the value must be consistent. This is the default local Oracle use, 9i

Previously, SID = jcdb connection was used. The value in the corresponding server listening configuration file is sid_name = jcdb'
)
)
For local connection orcl:
You need to start the listener and database service.
Listener. ora: The Listener is not part of an Oracle instance. It is used to direct connection requests

Instance. This configuration file is divided into two parts, one part is the configuration of the listener itself, including the protocol,

Address, port number, etc. The other part is the instance information of the database connected by the listener, including: instance

Name, Global Database Name, Oracle main directory, etc.

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.