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

环境:oracle 11.2.0.4

两个数据库实例:orcl test

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

[[email protected]]$ 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)

eth1      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

[[email protected] 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、启动并查看各监听状态

[[email protected]]$lsnrctl start list1

[[email protected]]$lsnrctl start list2

[[email protected]]$lsnrctl start list3

[[email protected]]$lsnrctl start list4

[[email protected]]$lsnrctl status list1

[[email protected]]$lsnrctl status list2

[[email protected]]$lsnrctl status list3

[[email protected]]$lsnrctl status list4

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

 

执行下面操作

SQL> alter system set local_listener=‘ ALL_LISTENER’;

SQL> alter system register;

再次查看各侦听器状态

[[email protected] 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

[[email protected] 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

[[email protected] 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/[email protected]: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/[email protected]: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/[email protected]: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/[email protected]: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这个端口监听着两个实例

[[email protected] 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文件

[[email protected] 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

[[email protected] 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

[[email protected] 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状态发现实例已经注册成功了

 

[[email protected]]$ 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实例

[[email protected]]$ 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/[email protected]: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/[email protected]: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监听即可。

[[email protected] 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文件

[[email protected] 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

[[email protected] 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并查看状态

[[email protected] admin]$ lsnrctl startlist2

[[email protected] 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状态发现实例已经注册成功了

[[email protected] 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/[email protected]: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

时间: 2024-07-30 20:40:03

oracle配置多网络接口多端口 listener的相关文章

oracle的sqlnet.ora , tnsnames.ora , Listener.ora 文件的作用(转)

oracle网络配置三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下.1. sqlnet.ora-----作用类似于linux或者其他unix的nsswitch.conf文件,通过这个文件来决定怎么样找一个连接中出现的连接字符串.例如我们客户端输入sqlplus sys/[email protected]假如我的sqlnet.ora是下面这个样子SQLNET.AUTHENTICATION_

12C -- 配置EM Express的端口

EM Express是基于web接口的图形化数据库管理工具. 内嵌到数据库中,可以用来监控.管理数据的性能和完成大多数管理工作. EM Express是轻量级的管理工具,减少了数据库服务器的开销.没有对应的后台进程或者task与其相关联. 它需要使用数据库内部的组件,比如XDB.sql*net. 查看em  express使用的端口号: select dbms_xdb_config.gethttpsport() from dual; 访问em express https://localhost:

ORACLE配置tnsnames.ora文件实例

ORACLE配置tnsnames.ora文件实例客户机为了和服务器连接,必须先和服务器上的监听进程联络.ORACLE通过tnsnames.ora文件中的连接描述符来说明连接信息.一般tnsnames.ora 是建立在客户机上的.如果是客户机/服务器结构,整个网络上只有一台机器安装了ORACLE数据库服务器,那么只需在每个要访问ORACLE服务器的客户机上定义该文件,在服务器上无需定义.但是,如果网络上有多台机器均安装了ORACLE数据库服务器,并且服务器之间有数据共享的要求,那么在每台服务器上都

oracle 配置服务端

oracle 配置服务端,类似我们配置java环境一样 防止乱码的配置: 变量名:NLS_LANG 变量值:SIMPLIFIED CHINESE_CHINA.ZHS16GBK 选择数据库的配置(重要): 变量值:TNS_ADMIN 变量名:D:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN(就是你的oracle安装的目录) 这是我的path配置: D:\app\Administrator\product\11.2.0\dbhome

Maven的Oracle配置错误

第一次发博文,希望把自己的经验写下来,防止以后忘记. 今天碰到一个错误,就是用maven搭建项目时,pom.xml文件中的Oracle配置总是报错,在百度上搜了很久都没有搜到原因,后来才知道,Oracle是收费的,所以他的jar包是不能直接下载的. 解决方案: 1.交钱给下载, 2.上述不实际,可以去百度上下载别人的本地仓库,带Oracle的,有很多,下载之后替换掉目录中的Oracle即可!

centos7 && centos6.5部KVM使用NAT联网并为虚拟机配置firewalld && iptables防火墙端口转发

centos7 && centos6.5 部KVM使用NAT联网并为虚拟机配置firewalld && iptables防火墙端口转发 一.准备工作: 1: 检查kvm是否支持a: grep '(vmx|svm)' /proc/cpuinfo vmx是intel cpu支持的svm是AMD cpu支持的如果flags: 里有vmx 或者svm就说明支持VT:如果没有任何的输出,说明你的cpu不支持,将无法使用KVM虚拟机. b: 确保BIOS里开启VT: Intel(R)

连接oracle数据库出现:ORA-12505,TNS:listener does not currently know of SID given in connect descriptor

Java使用 jdbc:oracle:thin:@11.1.0.14:1521:orcl 连接oracle数据库出现: ORA-12505,TNS:listener does not currently know of SID given in connect descriptor 错误. 表明服务器上sid为orcl的服务并不存在,可以换个方式直接连接服务:把最后一个冒号换为斜杠.顺利连上数据库 jdbc:oracle:thin:@11.1.0.14:1521/orcl

ORACLE 配置event参数

下面测试来至于11G 1,数据库的版本 www.htz.pw > select * from v$version;   BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production PL/SQL Release 11.2.0.4.0

Tools下的mdscongiguer 文件中 43行 oracle 配置 发现需要连接库 -lclntsh libclntsh.so 库是个什么东西呢?

Tools下的mdscongiguer     文件中 43行  oracle 配置      发现需要连接库 -lclntsh      libclntsh.so 库是个什么东西呢? 分想一个知乎网站上的帖子: -----------------------------------------------------------------------------------------------------------------------------------------------