Modifying the Oracle Database listening port number

Source: Internet
Author: User
Tags reserved

The Oracle default port number is 1521. It's easy for hackers to scan and remember your database every day.

So it's necessary to modify the default port number.

1. Check the listening status first

Lsnrctl status

2. Turn off monitoring

Lsnrctl stop

3. Modify the Listening file 1521====>10001

Sid_list_listener =
(Sid_list =
(Sid_desc =
(Oracle_home =/u01/11g)
(Sid_name = PU)
)
)


LISTENER =
(Description_list =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = target) (PORT = 10001))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1521))
)
)


Adr_base_listener =/u01/oracle


4, Login Database modification Local_listenner



Sql> Show Parameter Local_listener


NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
Local_listener string


Values value is empty


Modifying the Local_listener parameter

Sql> Show Parameter Local_liste


NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
Local_listener string


Sql> alter system set local_listener= "(address = (protocol = TCP) (host = target)
2 (port = 10001)) ";


System altered.


Sql> Show Parameter Local_lis


NAME TYPE
------------------------------------ ----------------------
VALUE
------------------------------
Local_listener string
(address = (protocol = tcp) (ho
St = target)
(port = 10001))


5. Start monitoring

[[email protected] ~]$ lsnrctl start


Lsnrctl for linux:version 11.2.0.3.0-production on 10-may-2016 16:48:35


Copyright (c) 1991, Oracle. All rights reserved.


Starting/u01/11g/bin/tnslsnr:please wait ...


Tnslsnr for Linux:version 11.2.0.3.0-production
System parameter File Is/u01/11g/network/admin/listener.ora
Log messages Written To/u01/oracle/diag/tnslsnr/target/listener/alert/log.xml
Listening on: (Description= (Address= (protocol=tcp) (Host=target) (port=10001)))
Listening on: (Description= (Address= (PROTOCOL=IPC) (key=extproc1521)))


Connecting to (Description= (address= (protocol=tcp) (Host=target) (port=10001)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version Tnslsnr for Linux:version 11.2.0.3.0-production
Start Date 10-may-2016 16:48:36
Uptime 0 days 0 hr. 0 min. 0 sec
Trace level off
Security on:local OS Authentication
SNMP OFF
Listener Parameter File/u01/11g/network/admin/listener.ora
Listener Log File/u01/oracle/diag/tnslsnr/target/listener/alert/log.xml
Listening Endpoints Summary ...
(Description= (address= (protocol=tcp) (Host=target) (port=10001)))
(Description= (address= (PROTOCOL=IPC) (key=extproc1521)))
Services Summary ...
Service "Pu" has 1 instance (s).
Instance "Pu", status UNKNOWN, have 1 handler (s) for the This service ...
The command completed successfully

6. View System Status

[Email protected] ~]$ Netstat-ano|grep 10001
TCP 0 0 192.168.6.152:26082 192.168.6.152:10001 established off (0.00/0/0)
TCP 0 0::: 10001:::* LISTEN off (0.00/0/0)
TCP 0 0:: ffff:192.168.6.152:10001:: ffff:192.168.6.152:26082 established keepalive (7193.37/0/0)

10001 Port number has been turned on


7. Verify Login

[Email protected] ~]$ sqlplus/as [email protected]:10001:pu


Sql*plus:release 11.2.0.3.0 Production on Tue 10 16:50:50 2016


Copyright (c) 1982, Oracle. All rights reserved.




Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real application testing options


Sql>


Modifying the Oracle Database listening port number

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.