91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

oracle配置多網絡接口多端口 listener

發布時間:2020-07-28 05:08:48 來源:網絡 閱讀:839 作者:lineqi 欄目:關系型數據庫

環境: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

 


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

大方县| 齐齐哈尔市| 娱乐| 镇巴县| 遵义市| 广州市| 曲阜市| 滕州市| 永嘉县| 梨树县| 潼南县| 大田县| 当阳市| 天全县| 亚东县| 崇义县| 广丰县| 宁都县| 中牟县| 区。| 额尔古纳市| 凯里市| 宜君县| 上林县| 宁明县| 东乡县| 洪洞县| 张家港市| 乳山市| 金山区| 韩城市| 开封县| 邢台县| 内江市| 北辰区| 昭平县| 苏尼特左旗| 通江县| 平罗县| 万全县| 进贤县|