Configure instances on the Oracle listener server and client

Source: Internet
Author: User

The listener. ora and tnsnames. ora files are often difficult to use due to format issues. I have configured and kept a backup, and I will copy it and modify it later! Hey ~~~

Because Linux is usually used in many cases, sometimes you may encounter a problem with the sqlnet. ora file. Simply delete it ~~

Upload the file and run it directly. Do not close the pop-up window.

Oracle Server listener. ora file (an instance ):

Listener =

(Description_list =

(Description =

(Address_list =

(Address = (Protocol = TCP) (host = hostname) (Port = 1521) // host name or IP address and port settings

)

)

)

Sid_list_listener =

(Sid_list =

(Sid_desc =

(Sid_name = database1) // database1 indicates the database instance name.

(ORACLE_HOME =/opt/Oracle/product/10.1.0) // Oracle Installation Directory, which is changed according to the installation conditions

(Program = EXTPROC)

)

)

Oracle Server listener. ora file (two instances ):

Listener =

(Description_list =

(Description =

(Address_list =

(Address = (Protocol = TCP) (host = hostname) (Port = 1521 ))

)

)

)

Sid_list_listener =

(Sid_list =

(Sid_desc =

(Sid_name = database1) // database1 is the database instance1

(ORACLE_HOME =/opt/Oracle/product/10.1.0)

(Program = EXTPROC)

)

(Sid_desc =

(Sid_name = database2) // database2 is the database instance2

(ORACLE_HOME =/opt/Oracle/product/10.1.0)

(Program = EXTPROC)

)

)

Oracle Server listener start, stop, and view the status command:

$ LSNRCTL start

$ LSNRCTL stop

$ LSNRCTL status

Oracle client tnsnames. ora file:

Oralocal = // alias oralocal

(Description =

(Address_list =

(Address = (Protocol = TCP) (host = hostname) (Port = 1521 ))

)

(CONNECT_DATA =

(SERVICE_NAME = database1) // database1 is the SID Name.

)

)

Run the following command on the Oracle client to check the listener connection status:

$ Tnsping alias

Example: Execute the command $ tnsping oralocal with an oracle user

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.