修改Oracle监听问题

登录sqlplus

SQL>show parameter listen

使用新端口

alter system set local_listener='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1522))';

show parameter local_l

关闭监听

lsnrctl stop

开启监听

lsnrctl start

修改listener.ora里的port的端口为要修改的,如1522

路径:$ORACLE_HOME/network/admin/

listener.ora文件

# listener.ora Network Configuration File: D:\app\px_pa\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:\app\px_pa\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:\app\px_pa\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )

 

  (SID_DESC =

    (GLOBAL_DBNAME = gdlisnet)

    (ORACLE_HOME =D:\app\px_pa\product\11.2.0\dbhome_1)

    (SID_NAME = gdlisnet)

    )

  )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = DESKTOP-A8SB75L)(PORT = 1522))

      (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.10.37)(PORT = 1522))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

ADR_BASE_LISTENER = D:\app\px_pa

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

改完后如果报ORA-12514不能识别监听,然后再在服务器listener.ora添加以下内容(上边红色为添加位置)

  (SID_DESC =

    (GLOBAL_DBNAME = gdlisnet)

    (ORACLE_HOME =D:\app\px_pa\product\11.2.0\dbhome_1)

    (SID_NAME = gdlisnet)

    )

  )

 

 

 

 

 

 

 

 

 

本机连不上时候,HOST填写127.0.0.1,客户端连不上时候时候再加一个配置填详细IP地址

(ADDRESS = (PROTOCOL = TCP)(HOST =192.168.10.37)(PORT = 1522))

 

你可能感兴趣的:(修改Oracle监听问题)