How Does Oracle Change the port number of listener (Linux)

Source: Internet
Author: User
Tags sqlplus

When installing oracle on Linux, I accidentally installed the listener twice. The port number of the listener is changed to 1522 instead of the default 1521. The client has not been connected for a long time, finally, we found that the port number of listener is incorrect. To change the listener port number, follow these steps:

 

1. Stop listener and run the LSNRCTL Stop command.

 

2. After the listener is stopped, go to your $ ORACLE_HOME/Network/admin and find the listener. ora file.

 

3. Use VI to edit this file. Here you can view the port number of listener and change it to the value you want. Here it is changed from 1522 to 1521.

 

4. Save the modified File

 

5. Start sqlplus and log on to the database using the system account. sqlplus system/password @***

 

6. Execute the following command:

Alter system set local_listener = "(address = (Protocol = TCP) (host = oraclehost) (Port = 1521 ))";
Alter system register;

7. Execute LSNRCTL status to verify the listener status.

Change the port number defined in the tnsnames. ora file related to the client or server, and verify the logon using sqlplus on the client.

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.