Basic PL/SQL programming (12) [Listener, tnsname configuration, Overview] [service mode, command line mode]

Source: Internet
Author: User

1. Listener Overview:

Processes running on the database server are used to detect and accept the queried network. You can use listener to monitor the control and interact with the listener. the listener's job is to listen to the network, when a request is detected, the listener will take effect of the request, register the customer to the database, and then send the customer a server process. Once a connection listener is set up, it does not assume any role and is connected through TCP/IP. The default port is 1521. When multiple users connect, it is automatically allocated to multiple ports, avoid the load on port 1521.

2. Start the listener through the service and syntax.

Use the service: Start-run-service. msc to find the corresponding listener to start or stop.

Command Line Method:

Lsnrctl status -- view the status

Lsnrctl startlistener_name -- open

Lsnrctl stoplistener_name -- stop

3. Add a listener to the service and add it to the service through the syntax www.2cto.com

Add Configuration tool:

-- Start-Oracle directory-configuration and migration tool-Net Manager

 

It will not be refreshed in the service list immediately after it is added. You need to manually start it.

Lsnrctl start listener_name -- open

You can also add them manually. Find the location of the file, the following location:

Location of the listener Configuration File: F: \ oracle \ product \ 10.2.0 \ db_1 \ network \ ADMIN \ listener. ora

5. Add the tnsnames Service

Configure to add tnsname: Start-Oracle directory-configure and port tool-Net configurationAssistant


 

Maintenance Method (ADD, modify, rename, etc.)-Confirm Server Name-select protocol-select host name and port number-complete.

You can also add them manually. Find the location of the file, the following location:

Tnsnames configuration file location: F: \ oracle \ product \ 10.2.0 \ db_1 \ network \ ADMIN \ tnsnames. ora

6. Description:

As shown in the following figure: different access server names are replaced by one server. However, different listeners and port numbers. So that different listening programs and port numbers can be connected to the same server.

 

ORA = -- Name of the accessed Server

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP) (HOST = FREESKYC-DF543C) (PORT = 1521 ))

)

(CONNECT_DATA =

(SERVICE_NAME = testdb) -- Name of the replaced Server

)

)

 

TESTDB = -- Name of the accessed Server

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = FREESKYC-DF543C) (PORT = 1521 ))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = testdb) -- Name of the replaced Server

)

)




From the column zhang6622056

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.