Network, Oracle

Changing Listener Port Number for Database Connection Requests

To change the listener port number for database connection requests to 1522:To change the listener port number for database connection requests to 1522:
Stop the listener.
See “Stopping and Starting the Listener” for instructions.
Open the file listener.ora with a text editor.
Table: Location of the listener.ora File shows the location of this file on each platform.
Location of the listener.ora File
Platform LocationLinux
cd $ORACLE_HOME/network/admin/vi listener.ora
Windows
c:\oracledba\app\oracle\product\10.2.0\server\NETWORK\ADMIN\

Locate the following section of the file:
LISTENER =  (DESCRIPTION_LIST =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))      (ADDRESS = (PROTOCOL = TCP)(HOST = dberman)(PORT = 1521))    )  )
Note that the line indicated in bold may or may not be present in the file.
Change the text (PORT = 1521) to (PORT = 1522).
Save the modified listener.ora file.
Start the listener.
See “Stopping and Starting the Listener” for instructions.
Start SQL Command Line and connect to the database as user SYSTEM.
See “Connecting Locally with SQL Command Line” for instructions. You must supply the SYSTEM password. You set this password upon installation (Windows) or configuration (Linux) of Oracle Database dba.
Enter the following two commands:
ALTER SYSTEM SET LOCAL_LISTENER = “(ADDRESS=(PROTOCOL=TCP)(HOST=dberman.mydomain.com)(PORT=1522))”;
ALTER SYSTEM REGISTER;
Exit SQL Command Line and run the lsnrctl status command to verify the port number change.
The new port number should be displayed in the Listening Endpoints Summary section of the status report, and the report should include the following lines:
Service “dba” has 1 instance(s).  Instance “dba”, status READY, has 1 handler(s) for this service…

Advertisements
Standard

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s