我的编程空间,编程开发者的网络收藏夹
学习永远不晚

oracle配置多网络接口多端口 listener

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

oracle配置多网络接口多端口 listener

环境:oracle 11.2.0.4

两个数据库实例:orcl test

主机名解析:192.168.1.30 orcl.lineqi.com orcl


[oracle@orcladmin]$ ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0C:29:40:07:9A 

          inetaddr:192.168.1.30  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr:fe80::20c:29ff:fe40:79a/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1

          RX packets:2548 errors:0 dropped:0overruns:0 frame:0

          TX packets:1875 errors:0 dropped:0overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:262084 (255.9 KiB)  TX bytes:263913 (257.7 KiB)

 

eth2      Link encap:Ethernet  HWaddr 00:0C:29:40:07:A4 

          inet addr:192.168.1.31  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr:fe80::20c:29ff:fe40:7a4/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500 Metric:1

          RX packets:297 errors:0 dropped:0overruns:0 frame:0

          TX packets:11 errors:0 dropped:0overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:21490 (20.9 KiB)  TX bytes:746 (746.0 b)

一、在两个网络接口的不同端口监听一个实例

1、配置listener

[oracle@orcl admin]$ cat listener.ora

# listener.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

 

LIST4 =

 (DESCRIPTION_LIST =

   (DESCRIPTION =

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.31)(PORT = 1524))

    )

  )

LIST3 =

 (DESCRIPTION_LIST =

   (DESCRIPTION =

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1523))

    )

  )

LIST2 =

 (DESCRIPTION_LIST =

   (DESCRIPTION =

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

    )

  )

 

LIST1 =

 (DESCRIPTION_LIST =

   (DESCRIPTION =

     (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521))

     (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

    )

  )

2、接着配置tnsname.ora

在/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsname.ora添加如下内容。

ALL_LISTENER =

(

    DESCRIPTION=

   (ADDRESS_LIST =

    (ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521))

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

    (ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1523))

    (ADDRESS =(PROTOCOL = TCP)(HOST = 192.168.1.31)(PORT = 1524))

    )

  (

     CONNECT_DATA=

   (SERVICE_NAME = orcl)

  )

)

3、启动并查看各监听状态

[oracle@orcladmin]$lsnrctl start list1

[oracle@orcladmin]$lsnrctl start list2

[oracle@orcladmin]$lsnrctl start list3

[oracle@orcladmin]$lsnrctl start list4

[oracle@orcladmin]$lsnrctl status list1

[oracle@orcladmin]$lsnrctl status list2

[oracle@orcladmin]$lsnrctl status list3

[oracle@orcladmin]$lsnrctl status list4

说明:正常情况下orcl实例会被注册到list1,其余监听上没有任何服务与实例。

 

执行下面操作

SQL> alter system set local_listener=' ALL_LISTENER’;

SQL> alter system register;

再次查看各侦听器状态

[oracle@orcl admin]$ lsnrctl status list2

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 19:35:57

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.30)(PORT=1522)))

STATUSof the LISTENER

------------------------

Alias                     list2

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 17:02:56

Uptime                    0 days 2 hr. 33 min. 1 sec

TraceLevel               off

Security                  ON: Local OS Authentication

SNMP                      OFF

ListenerParameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File        /u01/app/oracle/diag/tnslsnr/orcl/list2/alert/log.xml

ListeningEndpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1522)))

Services Summary...

Service "orcl" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Service "orclXDB" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Thecommand completed successfully

[oracle@orcl admin]$ lsnrctl status list3

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 19:35:55

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.30)(PORT=1523)))

STATUSof the LISTENER

------------------------

Alias                     list3

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 19:16:16

Uptime                    0 days 0 hr. 19 min. 38 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

ListenerParameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File        /u01/app/oracle/diag/tnslsnr/orcl/list3/alert/log.xml

ListeningEndpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.30)(PORT=1523)))

Services Summary...

Service "orcl" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Service "orclXDB" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Thecommand completed successfully

[oracle@orcl admin]$ lsnrctl status list4

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 19:35:59

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.31)(PORT=1524)))

STATUSof the LISTENER

------------------------

Alias                     list4

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 19:16:14

Uptime                    0 days 0 hr. 19 min. 45 sec

TraceLevel               off

Security                  ON: Local OS Authentication

SNMP                      OFF

ListenerParameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File        /u01/app/oracle/diag/tnslsnr/orcl/list4/alert/log.xml

ListeningEndpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.31)(PORT=1524)))

Services Summary...

Service "orcl" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Service "orclXDB" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Thecommand completed successfully

 

4、通过客户端测试

C:\Users\Administrator>sqlpluslineqi/lineqi@192.168.1.30:1521/orcl

 

SQL*Plus:Release 11.2.0.1.0 Production on 星期日 5月 17 19:38:38 2015

 

Copyright(c) 1982, 2010, Oracle.  All rightsreserved.

 

 

连接到:

OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With thePartitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

orcl

 

C:\Users\Administrator>sqlpluslineqi/lineqi@192.168.1.30:1522/orcl

 

SQL*Plus:Release 11.2.0.1.0 Production on 星期日 5月 17 19:38:55 2015

 

Copyright(c) 1982, 2010, Oracle.  All rightsreserved.

 

 

连接到:

OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With thePartitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

orcl

 

C:\Users\Administrator>sqlpluslineqi/lineqi@192.168.1.30:1523/orcl

 

SQL*Plus:Release 11.2.0.1.0 Production on 星期日 5月 17 19:39:08 2015

 

Copyright(c) 1982, 2010, Oracle.  All rightsreserved.

 

连接到:

OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With thePartitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

orcl

C:\Users\Administrator>sqlpluslineqi/lineqi@192.168.1.31:1524/orcl

 

SQL*Plus:Release 11.2.0.1.0 Production on 星期日 5月 17 19:41:11 2015

 

Copyright(c) 1982, 2010, Oracle.  All rightsreserved.

 

 

连接到:

OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With thePartitioning, OLAP, Data Mining and Real Application Testing options

 

SQL> select instance_name from v$instance;

 

INSTANCE_NAME

----------------

orcl

上面是通过EZCONNECT方式来测试的,也可以在客户端配置来测试,在tnsname.ora添加如下内容。

orcl=

  (DESCRIPTION =

   (ADDRESS_LIST =

         (LOAD_BALANCE=ON)

         (FAILOVER=ON)

       (ADDRESS= (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1521))

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

       (ADDRESS= (PROTOCOL = TCP)(HOST = 192.168.1.30)(PORT = 1523))

       (ADDRESS= (PROTOCOL = TCP)(HOST = 192.168.1.31)(PORT = 1524))

    )

   (CONNECT_DATA =

     (SERVICE_NAME = orcl)

    )

  )

二、在一个网接口的不同端口监听多个实例

说明:192.168.1.30:1521监听orcl实例

           192.168.1.30:1522监听test实例

目前是1521这个端口监听着两个实例

[oracle@orcl admin]$ lsnrctl status list1

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 17:00:27

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl.lineqi.com)(PORT=1521)))

STATUSof the LISTENER

------------------------

Alias                     list1

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 15:45:52

Uptime                    0 days 1 hr. 14 min. 35 sec

TraceLevel               off

Security                  ON: Local OS Authentication

SNMP                      OFF

ListenerParameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File        /u01/app/oracle/diag/tnslsnr/orcl/list1/alert/log.xml

ListeningEndpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1521)))

 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

ServicesSummary...

Service "orcl" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Service "orclXDB" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Service "test" has 1 instance(s).

  Instance"test", status READY, has 1 handler(s) for this service...

Service "testXDB" has 1 instance(s).

  Instance"test", status READY, has 1 handler(s) for this service...

Thecommand completed successfully

 

1、配置listener

这里配置list2监听即可,可以通过netca工具,也可直接编辑listener.ora文件

[oracle@orcl admin]$ cat listener.ora

#listener.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

#Generated by Oracle configuration tools.

 

LIST2 =

 (DESCRIPTION_LIST =

    (DESCRIPTION=

      (ADDRESS =(PROTOCOL = TCP)(HOST = orcl.lineqi.com)(PORT = 1522))

    )

  )

 

LIST1 =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST =orcl.lineqi.com)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY =EXTPROC1521))

    )

  )

 

ADR_BASE_LIST2 = /u01/app/oracle

 

ADR_BASE_LIST1= /u01/app/oracle

 

[oracle@orcl admin]$ lsnrctl start list2

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 17:02:56

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Starting/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

 

TNSLSNRfor Linux: Version 11.2.0.4.0 - Production

Systemparameter file is/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Logmessages written to /u01/app/oracle/diag/tnslsnr/orcl/list2/alert/log.xml

Listeningon: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1522)))

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl.lineqi.com)(PORT=1522)))

STATUSof the LISTENER

------------------------

Alias                     list2

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 17:02:56

Uptime                    0 days 0 hr. 0 min. 0 sec

TraceLevel               off

Security                  ON: Local OS Authentication

SNMP                      OFF

ListenerParameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File         /u01/app/oracle/diag/tnslsnr/orcl/list2/alert/log.xml

ListeningEndpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1522)))

Thelistener supports no services

Thecommand completed successfully

此时没有监听任何服务或实例

2、接着配置tnsname.ora

[oracle@orcl admin]$ cat tnsnames.ora

ORCL =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.30)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )

test =

  (DESCRIPTION =

   (ADDRESS_LIST =

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

    )

   (CONNECT_DATA =

     (SERVICE_NAME = test)

    )

  )

执行下面操作

SQL> alter system set local_listener='test';

SQL> alter system register;

接着查看list2状态发现实例已经注册成功了

 

[oracle@orcladmin]$ lsnrctl status list2

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 17:06:04

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl.lineqi.com)(PORT=1522)))

STATUSof the LISTENER

------------------------

Alias                     list2

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 17:02:56

Uptime                    0 days 0 hr. 3 min. 7 sec

TraceLevel               off

Security                  ON: Local OS Authentication

SNMP                      OFF

ListenerParameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File        /u01/app/oracle/diag/tnslsnr/orcl/list2/alert/log.xml

ListeningEndpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1522)))

ServicesSummary...

Service"test" has 1 instance(s).

  Instance "test", status READY, has1 handler(s) for this service...

Service"testXDB" has 1 instance(s).

  Instance "test", status READY, has1 handler(s) for this service...

Thecommand completed successfully

现在查看list1发现1521这个商品只监听orcl实例

[oracle@orcladmin]$ lsnrctl status list1

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 17:06:47

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl.lineqi.com)(PORT=1521)))

STATUSof the LISTENER

------------------------

Alias                     list1

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 15:45:52

Uptime                    0 days 1 hr. 20 min. 54 sec

TraceLevel               off

Security                  ON: Local OS Authentication

SNMP                      OFF

ListenerParameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File        /u01/app/oracle/diag/tnslsnr/orcl/list1/alert/log.xml

Listening Endpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service "orcl" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

Service "orclXDB" has 1 instance(s).

  Instance"orcl", status READY, has 1 handler(s) for this service...

The command completed successfully

3、通过客户端测试

C:\Users\Administrator>sqlplussystem/test@192.168.1.30:1522/test

 

SQL*Plus:Release 11.2.0.1.0 Production on 星期日 5月 17 17:09:52 2015

 

Copyright(c) 1982, 2010, Oracle.  All rightsreserved.

 

 

连接到:

OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With thePartitioning, OLAP, Data Mining and Real Application Testing options

 

SQL>select instance_name from v$instance;

 

INSTANCE_NAME

----------------

Test

 

C:\Users\Administrator>sqlpluslineqi/lineqi@192.168.1.30:1521/orcl

 

SQL*Plus:Release 11.2.0.1.0 Production on 星期日 5月 17 17:09:34 2015

 

Copyright(c) 1982, 2010, Oracle.  All rightsreserved.

 

 

连接到:

OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With thePartitioning, OLAP, Data Mining and Real Application Testing options

 

SQL>select instance_name from v$instance;

 

INSTANCE_NAME

----------------

orcl

 

三、在两个网络接口上分别配置监听器监听两个实例

说明:192.168.1.30:1521监听orcl实例

           192.168.1.31:1522监听test实例

实例orcl创建好list1监听后已经被监听了,这里直接配置list2监听即可。

[oracle@orcl admin]$ lsnrctl status list1

 

LSNRCTL for Linux: Version 11.2.0.4.0 -Production on 17-MAY-2015 16:41:25

 

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

 

Connecting to(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl.lineqi.com)(PORT=1521)))

STATUS of the LISTENER

------------------------

Alias                     list1

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

Start Date                17-MAY-2015 15:45:52

Uptime                    0 days 0 hr. 55 min. 32 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

Listener Log File        /u01/app/oracle/diag/tnslsnr/orcl/list1/alert/log.xml

Listening Endpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1521)))

 (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary...

Service"orcl" has 1 instance(s).

  Instance "orcl", status READY, has1 handler(s) for this service...

Service"orclXDB" has 1 instance(s).

  Instance "orcl", status READY, has1 handler(s) for this service...

Thecommand completed successfully

1、配置listener

这里配置list2监听即可,可以通过netca工具,也可直接编辑listener.ora文件

[oracle@orcl admin]$ cat listener.ora

#listener.ora Network Configuration File:/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

#Generated by Oracle configuration tools.

 

LIST2 =

 (DESCRIPTION_LIST =

    (DESCRIPTION=

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

    )

  )

 

LIST1 =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST =orcl.lineqi.com)(PORT = 1521))

      (ADDRESS = (PROTOCOL = IPC)(KEY =EXTPROC1521))

    )

  )

 

ADR_BASE_LIST2 = /u01/app/oracle

 

ADR_BASE_LIST1= /u01/app/oracle

2、接着配置tnsname.ora

[oracle@orcl admin]$ cat tnsnames.ora

ORCL =

  (DESCRIPTION =

    (ADDRESS_LIST =

      (ADDRESS = (PROTOCOL = TCP)(HOST =192.168.1.30)(PORT = 1521))

    )

    (CONNECT_DATA =

      (SERVICE_NAME = orcl)

    )

  )

test =

  (DESCRIPTION =

   (ADDRESS_LIST =

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

    )

   (CONNECT_DATA =

     (SERVICE_NAME = test)

    )

  )

3、启动list2并查看状态

[oracle@orcl admin]$ lsnrctl startlist2

 [oracle@orcl admin]$ lsnrctl status list2

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 16:06:55

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.31)(PORT=1522)))

STATUSof the LISTENER

------------------------

Alias                     LIST2

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 15:57:56

Uptime                    0 days 0 hr. 8 min. 58 sec

TraceLevel               off

Security                  ON: Local OS Authentication

SNMP                      OFF

ListenerParameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File        /u01/app/oracle/diag/tnslsnr/orcl/list2/alert/log.xml

ListeningEndpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1522)))

Thelistener supports no services

Thecommand completed successfully

这里发现没任何服务或实例被监听

执行下面操作

SQL>alter system set local_listener='test';

SQL>alter system register;

接着查看list2状态发现实例已经注册成功了

 [oracle@orcl admin]$ lsnrctl status list2

 

LSNRCTLfor Linux: Version 11.2.0.4.0 - Production on 17-MAY-2015 16:08:03

 

Copyright(c) 1991, 2013, Oracle.  All rightsreserved.

 

Connectingto (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.31)(PORT=1522)))

STATUSof the LISTENER

------------------------

Alias                     LIST2

Version                   TNSLSNR for Linux: Version11.2.0.4.0 - Production

StartDate                17-MAY-2015 15:57:56

Uptime                    0 days 0 hr. 10 min. 7 sec

TraceLevel               off

Security                 ON: Local OSAuthentication

SNMP                      OFF

ListenerParameter File  /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora

ListenerLog File        /u01/app/oracle/diag/tnslsnr/orcl/list2/alert/log.xml

ListeningEndpoints Summary...

 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.lineqi.com)(PORT=1522)))

ServicesSummary...

Service"test" has 1 instance(s).

  Instance "test", status READY, has1 handler(s) for this service...

Service"testXDB" has 1 instance(s).

  Instance "test", status READY, has1 handler(s) for this service...

Thecommand completed successfully

4、通过客户端测试

C:\Users\Administrator>sqlplussystem/test@192.168.1.31:1522/test

 

SQL*Plus:Release 11.2.0.1.0 Production on 星期日 5月 17 16:21:09 2015

 

Copyright(c) 1982, 2010, Oracle.  All rightsreserved.

 

 

连接到:

OracleDatabase 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

With thePartitioning, OLAP, Data Mining and Real Application Testing options

 

SQL>select instance_name from v$instance;

 

INSTANCE_NAME

----------------

test

 


免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

oracle配置多网络接口多端口 listener

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

Apache实现多端口多主机名配置

1.基于域名的虚拟主机(不同域名相同IP和端口)向DNS服务提供虚拟Web站点的域名,以便当访问其中任何一个虚拟Web站点时,最终访问的都是同一个IP地址。 2.基于端口的虚拟主机(不同端口相同IP)通常只用于同一个Web站点,其网站的名称
2022-06-04

Apache多端口多站点的配置方法

本篇内容介绍了“Apache多端口多站点的配置方法”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!Apache多端口多站点的配置方法,配置ap
2023-06-05

Fedora中ifconfig如何配置网络接口

这篇文章主要为大家展示了“Fedora中ifconfig如何配置网络接口”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“Fedora中ifconfig如何配置网络接口”这篇文章吧。1、Fedora
2023-06-16

CentOS7中怎么配置网络接口和网络参数

要配置网络接口和网络参数,可以按照以下步骤进行操作:打开终端,输入以下命令来编辑网络配置文件:sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0这里的eth0是网卡的名称,根据实际情况替换成对
CentOS7中怎么配置网络接口和网络参数
2024-03-04

Docker容器化Nginx的端口映射与网络配置(如何在Docker中配置Nginx的端口映射和网络?)

通过Docker容器化Nginx可增强隔离性、可移植性和可扩展性。端口映射允许将容器端口与主机端口关联,而网络配置可定义容器的网络访问属性。默认网络模式为bridge,但host模式可共享主机的网络接口。其他网络配置选项包括别名、暴露端口、链接以及DNS服务器和域的指定。
Docker容器化Nginx的端口映射与网络配置(如何在Docker中配置Nginx的端口映射和网络?)
2024-04-02

怎么在Docker中配置初级网络端口映射

怎么在Docker中配置初级网络端口映射?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。端口映射Docker容器启动之前,如果不进行端口映射,在容器外部是无法通过网络来访问容
2023-06-06

日本网络服务器地址及端口怎么配置

如果您想要配置日本网络服务器地址及端口,需要先确定您要使用的网络协议,比如 HTTP、FTP 或者 SSH 等等。然后,根据您使用的软件或者工具,进行相应的配置。以下是一些常见的配置方法:对于 HTTP 和 FTP:1. 打开您的浏览器(比
2023-06-13

云服务器如何配置web服务器网络端口

要配置web服务器的网络端口,需要考虑以下几个方面:端口号:需要确定你的web服务器需要哪些端口,比如80(8080)端口,FTP(http)端口等。端口映射:需要将web服务器的端口映射到相应的端口号。可以使用动态端口分配协议(Dynamicportshare)来实现此功能。例如:https://www.example.com/portal.html。端口限制:要限制web服务器的端口
2023-10-26

云服务器如何配置web服务器网络端口设置

在云服务器中,可以配置web服务器的网络端口,以便客户端可以通过网络访问服务器进行数据处理和访问web页面。下面是一些网络端口的设置步骤:选择合适的网络端口:在云服务器的Web服务器端,通常会提供多个网络端口,其中一个是默认的端口(80)。如果你需要在多个平台之间进行数据传输,可以选择其他不同的端口以满足你的需要。配置网络参数:在云服务器的Web服务器端,通常会有一些网络参数供客户端配置,例如IP地址、TCP/IP连接数、...
2023-10-27

云服务器怎么配置全网络供应商的端口

如果您要配置全网络供应商的端口,需要遵循以下步骤:确定您要用于连接到网络的服务器的服务器IP地址。您可能需要在网络连接界面中找到服务器IP地址的前几个数字,或者在服务器目录中找到服务器的IP地址。确定您使用的端口。您需要使用哪些服务器提供端口来与您的网络连接进行通信。例如,您需要一个公共端口,用于与其他计算机进行通信。您可以使用以下端口:135端口:用于与主机的服务器进行通信;13
2023-10-26

云服务器怎么配置全网络供应商的端口设置

配置端口和网络供应商的端口有以下几个步骤:选择一个可用的端口在选择可用的端口之前,我们需要确定哪个端口是我们需要用来连接到云服务器的。我们可以使用端口扫描工具来确定哪些端口是我们需要使用的。例如,NortonSpeedTest可以扫描出当前端口为128.0.0.1或其他可用端口。配置端口和网络供应商在选择可用的端口之后
云服务器怎么配置全网络供应商的端口设置
2023-10-28

免费网络代理服务器地址和端口怎么配置

1. 打开浏览器,进入网络代理设置界面。不同的浏览器设置方式略有不同,一般在浏览器的“设置”或“选项”中找到“网络设置”或“代理设置”即可。2. 在代理服务器地址和端口的输入框中输入免费网络代理服务器地址和端口。这些地址和端口可以从免费网络
2023-06-13

云服务器如何配置web服务器网络端口命令

在云服务器的配置中,需要考虑网络端口的使用。下面是一些常用的网络端口,可以根据实际需求进行配置:Web服务器端口:Web服务器的端口号通常在100到200之间,用于与客户端进行通信。可以根据实际需求设置多个端口,以提高系统的响应速度和负载能力。DNS服务器端口:DNS服务器的端口号通常在100到500之间,用于向客户端
云服务器如何配置web服务器网络端口命令
2023-10-28

云服务器如何配置web服务器网络端口设置方法

首先,选择合适的云服务器供应商。不同的云服务器供应商提供的服务和价格都有所不同,需要根据自己的实际需求选择合适的供应商。例如,亚马逊的AWS提供了云服务器和托管服务,而微软的Azure提供了云服务器和托管服务。选择供应商时,需要考虑服务的稳定性、可靠性、价格、支持的硬件平台和服务等因素。确定云服务器的网络端口。网络端口
云服务器如何配置web服务器网络端口设置方法
2023-10-28

云服务器怎么配置全网络供应商的端口地址

全网络供应商的端口地址可以通过在云服务器上配置全局IP地址和子网掩码来实现。全局IP地址指的是整个服务器系统的IP地址,而子网掩码指的是服务器系统中子网的掩码,它们都是通过IP地址和子网掩码来进行划分的。通过全局IP地址和子网掩码的配置,可以将云服务器系统的不同服务器分别部署在不同的网络中,从而实现全网络的应用。全网络
云服务器怎么配置全网络供应商的端口地址
2023-10-28

云服务器配置Web服务器网络端口的命令方式

1.查看当前网络端口配置要配置云服务器上的Web服务器网络端口,首先需要查看当前的网络端口配置。可以使用以下命令来查看当前的网络端口配置:netstat-tuln该命令将显示当前正在监听的网络端口以及它们的状态。2.配置网络端口要配置Web服务器的网络端口,可以使用以下命令:sudovi/etc/nginx/nginx
云服务器配置Web服务器网络端口的命令方式
2023-10-28

传奇云服务器怎么选择端口连接的网络设置

首先,需要设置云服务器的连接端口,以及端口号,以便于不同的客户端可以选择相应的服务。在云服务器的连接页面,可以点击右下角的端口,来查看当前云服务器上的端口号和服务名。然后,可以点击服务器上的“服务名”,来查找与自己的云服务器连接的客户端所需的服务,以及其服务端口。在客户端的服务名称中,可以点击“更多选项”,然后选择“端口号”,来查看每个客户端可以连接到的服务,以及其端口。在端口号
2023-10-26

编程热搜

目录