В общем в одной подсети инстансы oracle с одинаковыми service name и портами жить могут.
в listener.ora добавляем информацию о новом подключении по IP и меняем порт
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 2001))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2001))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.22)(PORT = 2001))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2001))
)
)
В tnsnames.ora заносим информацию о новых экземплярах
SERVER01_DBORACLE_LOCAL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.22)(PORT = 2001))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dboracle)
)
)
SERVER01_DBORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 2001))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dboracle)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC2001))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
LISTENER_DBORACLE =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 2001))
После перезапускаем службы листенера и самой БД.
Проверяем командой
lsnrctl status
LSNRCTL for 64-bit Windows: Version 12.2.0.1.0 - Production on 13-APR-2017 16:27:57
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=2001)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 12.2.0.1.0 - Production
Start Date 13-APR-2017 15:28:54
Uptime 0 days 0 hr. 59 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File D:\DataBases\Oracle\product\12.2.0\dbhome_1\network\admin\listener.ora
Listener Log File D:\DataBases\Oracle\diag\tnslsnr\SERVER01\listener\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=2001)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC2001ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.0.22)(PORT=2001)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC2001ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=SERVER01)(PORT=5500))(Security=(my_wallet_directory=D:\DATABASES\ORACLE\admin\dboracle\xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "dboracle" has 1 instance(s).
Instance "dboracle", status READY, has 1 handler(s) for this service...
Service "dboracleXDB" has 1 instance(s).
Instance "dboracle", status READY, has 1 handler(s) for this service...
The command completed successfully
обязательно должна быть информация о
Service "dboracle" has 1 instance(s).
Instance "dboracle", status READY, has 1 handler(s) for this service...
Service "dboracleXDB" has 1 instance(s).
Instance "dboracle", status READY, has 1 handler(s) for this service...
lsnrctl reload – переинициализировать листенер иногда помагает, когда инстанс не инициализовался листенером