2 Day DBA > Managing Network Connections > Changing Listener Port Numbers > Changing the Listener Port ...
Changing the Listener Port Number for HTTP Connection Requests |
Previous |
Next |
If you change the listener port number for HTTP connection requests, you must ensure that all future HTTP connection requests use the new port number.
For example, if you change the listener port number for HTTP requests to 8087, you must use the following URL to access the Database Home Page:
http://host:8087/apex
where host
is the host name or IP address of the computer where Oracle Database XE is installed.
Note: When you change the listener port number for HTTP, the Go To Database Home Page menu item on the desktop can no longer open the Database Home Page. The following procedure contains an optional step that explains how to modify this menu item to function with the new port number. |
To change the listener port number for HTTP connection requests:
Do one of the following:
On Linux: Start a terminal session and log in to the Oracle Database XE host computer with the oracle
user account.
On Windows: Log in to the Oracle Database XE host computer as the user who installed Oracle Database XE, and then open a command window.
On Linux, ensure that environment variables are set according to the instructions in "Setting Environment Variables on the Linux Platform".
Ensure that the listener is started.
See "Viewing Listener Status" and "Stopping and Starting the Listener" for instructions.
Enter the following command at the operating system prompt to start SQL Command Line:
SQLPLUS /NOLOG
At the SQL Command Line prompt, enter the following command:
CONNECT SYSTEM/password
where password
is the SYSTEM
password that you set upon installation (Windows) or configuration (Linux) of Oracle Database XE.
At the SQL Command Line prompt, enter the following command:
EXEC DBMS_XDB.SETHTTPPORT(nnnn);
where nnnn represents the new port number to use for HTTP connection requests. Be certain that you select a port number that is not already in use.
For example, to use port number 8087 for HTTP connection requests, enter this command:
EXEC DBMS_XDB.SETHTTPPORT(8087);
If the command is successful, the following message is displayed:
PL/SQL procedure successfully completed.
Exit SQL Command Line (by entering the exit
command) and view listener status to verify the port number change.
See "Viewing Listener Status" for instructions. The new port number is displayed in the Listening Endpoints Summary section of the status report.
(Optional) To enable the Go To Database Home Page command on the desktop to work with the new port number, change the port number in the script that this command runs. The following table shows the scripts that you must change on each platform.
Platform | Script to Change When Changing the Listener Port for HTTP Connection Requests |
---|---|
Linux | /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/config/scripts/DatabaseHomePage.sh |
Windows | C:\oraclexe\app\oracle\product\10.2.0\server\Database_homepage.url |