1 instance membuat banyak listener Oracele 11g di Linux

11 May

1. umumnya konfigurasi listener adalah sebagai berikut
[oracle@orcl4 u01]$ vi /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl4.localdomain)(PORT = 1521))
)
)

2. setelah listener dijalankan & status
[oracle@orcl4 u01]$ lsnrctl start listener
[oracle@orcl4 u01]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.1.0.6.0 – Production on 11-MAY-2010 12:37:31
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl4.localdomain)(PORT=1521)))
STATUS of the LISTENER
————————
Alias                     listener
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 – Production
Start Date                11-MAY-2010 12:33:09
Uptime                    0 days 0 hr. 4 min. 21 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/orcl4/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl4)(PORT=1521)))
Services Summary…
Service “orcl4” has 1 instance(s).
Instance “orcl4”, status READY, has 1 handler(s) for this service…
Service “orcl4XDB” has 1 instance(s).
Instance “orcl4”, status READY, has 1 handler(s) for this service…
Service “orcl4_XPT” has 1 instance(s).
Instance “orcl4”, status READY, has 1 handler(s) for this service…
The command completed successfully

3. agar listener daat berjalan lebih dari 1 port, maka dapat dilakukan perubahan konfigurasi pada listener.ora pada server
[oracle@orcl4 u01]$ vi /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl4.localdomain)(PORT = 1521))
)
)

LISTENER2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl4.localdomain)(PORT = 1522))
)
)

SID_LIST_LISTENER2 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl4)
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
(SID_NAME = orcl4)
)
)

4. restart listener
[oracle@orcl4 u01]$ lsnrctl stop
[oracle@orcl4 u01]$ lsnrctl start listener2
[oracle@orcl4 u01]$ lsnrctl status listener2
LSNRCTL for Linux: Version 11.1.0.6.0 – Production on 11-MAY-2010 12:38:35
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl4.localdomain)(PORT=1522)))
STATUS of the LISTENER
————————
Alias                     listener2
Version                   TNSLSNR for Linux: Version 11.1.0.6.0 – Production
Start Date                11-MAY-2010 12:34:38
Uptime                    0 days 0 hr. 3 min. 57 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.1.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/orcl4/listener2/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl4)(PORT=1522)))
Services Summary…
Service “orcl4” has 1 instance(s).
Instance “orcl4”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully

5. mengedit tnsnames.ora pada client
[oracle@orcl4 u01]$ vi /u01/app/oracle/product/11.1.0/db_1/network/admin/tnsnames.ora
ORCL4 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl4)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl4)
)
)

ORCL4b =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = orcl4)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl4)
)
)

6. test koneksi
[oracle@orcl4 admin]$ sqlplus / as sysdba
SQL> conn scott/tiger@orcl4
Connected.
SQL> conn scott/tiger@orcl4b
Connected.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: