修改LOCAL_LISTENER参数
SQL> show parameter listen
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
listener_networks string
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=l
ocalhost)(PORT=1521))
remote_listener string
SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT= 1522))';
System altered.
SQL> show parameter local_l
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=l
ocalhost)(PORT=1522))
修改监听文件中的端口
[oracle@localhost admin]$ lsnrctl stop
[oracle@localhost admin]$ vi listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
[oracle@localhost admin]$ lsnrctl start
SQL> show parameter listen
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
listener_networks string
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=l
ocalhost)(PORT=1521))
remote_listener string
SQL> alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT= 1522))';
System altered.
SQL> show parameter local_l
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
local_listener string (ADDRESS=(PROTOCOL=TCP)(HOST=l
ocalhost)(PORT=1522))
修改监听文件中的端口
[oracle@localhost admin]$ lsnrctl stop
[oracle@localhost admin]$ vi listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
[oracle@localhost admin]$ lsnrctl start