Two oracle databases on one IP - oracle

What I have:
1) Oracle 11R1 services on Local system
2) Oracle 12c services on other account
TNS listener run from oracle 11R1 (but also I've create one for 12c)
As a first solution I try
A12c =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1531))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = A12c.1.1.1)
)
)
B11R1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = B11R1)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1531))
)
)
With this configuration I could connect to 11r1 (also on 1531 port !) but nt to 12c. When I setup two listener situation was same. When I run with 12c listener I could not connect to any databases.
Will be grateful for any suggestions.
Thank you

Related

Can't connect to oracle database with Oracle SQL Developer

When I try to connect I get error:
I disabled firewall, started the OracleServiceXE, but still get error.
When I use command lsnrctl status, I get:
lsnrctl start:
My tnsnames.ora file looks like that:
# tnsnames.ora Network Configuration File: C:\app\Coi\product\18.0.0\dbhomeXE\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.0)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.8)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)

oracle second listener not work

I created two databases one called test and one that is called archivio. The SID is equals to name. I also created a listener for SID test that responds on port 1521 and one for the SID archivio that should answer on port 1522.
I have verified that the services are active
the first listener works properly. The second, reported to the archivio database, does not work. I perform the test using net manager. The error message is:
the listener is not currently aware of the service requested in connect descriptor
with oracle sql developer i can connect to db archivio if i use local instead of base type connection
Other info:
windows 7 ultimate oracle 12c
LISTNER.ORA
# listener.ora Network Configuration File: C:\Program Files (x86)\Common Files\Quest Shared\instantclient-basic-windows.x64-11.2.0.4.0\listener.ora
# Generated by Oracle configuration tools.
LISTENER1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-PC)(PORT = 1522))
)
ADR_BASE_LISTENER1 = C:\app\cirom
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-PC)(PORT = 1521))
)
ADR_BASE_LISTENER = C:\app\cirom
ADR_BASE_LISTENER1 = C:\app\cirom
TNSNAMES.ORA
# tnsnames.ora Network Configuration File: C:\Program Files (x86)\Common Files\Quest Shared\instantclient-basic-windows.x64-11.2.0.4.0\tnsnames.ora
# Generated by Oracle configuration tools.
ARCHIVIO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-pc)(PORT = 1522))
)
(CONNECT_DATA =
(SERVICE_NAME = archivio)
)
)
LISTENER_TEST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
LISTENER_ARCHIVIO =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1522))
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = webgate1-pc)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)
In order to get an Oracle instance registered on a listener running on not default port (not TCP 1521) you have to configure the LOCAL_LISTENER parameter, for example:
(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1522))
The command is:
alter system set local_listener='(ADDRESS = (PROTOCOL=TCP)(HOST=hostname)(PORT=1522))' scope=both;
Change hostname with you hostname.
Then restart you database or issue the command:
alter system register;
Giovanni

Network adapter Could Not Established The Connection IN SQL Developer

I am trying connect the oracle database using SQL Developer tools but It showing me:
IO ERRORS: Network adapter Could Not Established The Connection
I Started the OracleXETNSListner service from service.msc: it's running.
I also used the lsnrctl start command, which couldn't start the listener either.
And one more thing: I used sqlplus command prompt: it works fine (also gets connected database)
Thanks in advance...
this is my Tnsname.ora file
my tnsname file located at C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = HP-PC)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

Need to Add Oracle Listener for Second NIC

I am currently running Oracle 11g on a Windows 2012 Environment.
I recently added another NIC to allow for failover, however I am not sure as to what to do with my listener.ora file and my tnsnames.ora file. Could someone offer guidance? For reference, the current IP I am using is 192.168.0.52 and the IP of the second NIC that I would like to add has the IP of 192.168.0.53.
Below is my listener.ora file:
# listener.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = D:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:D:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
)
)
ADR_BASE_LISTENER = D:\app\Administrator
Below is my tnsnames.ora file:
# tnsnames.ora Network Configuration File: D:\app\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.
LISTENER_ORCL =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
Thanks for all your help!
Well, you can specify multiple ADDRESS entries in the listener.ora:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.53)(PORT = 1521))
)
)
And in tnsnames.ora:
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.52)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.53)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
When I specify multiple addresses for listener, it listens on all interfaces listed. And when at least one address in tnsnames can be connected to -- it connects. I have 11g available for testing both on the client-side and on the server-side. I checked the documentation (Multiple Address Lists in tnsnames.ora) and it states that parameter (FAILOVER=on) can be specified in tnsnames.ora explicitly.

Pretty Printer for Oracle TNS entries?

I've got some TNS entries formatted as single long lines. Any pretty printers available? Here's an example of what I've currently got.
(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = trac403-vip.pixar.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = tmpltest) (INSTANCE_NAME = tmpltest3)))
Here you go :)
(DESCRIPTION =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = trac403-vip.pixar.com)(PORT = 1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = tmpltest)
(INSTANCE_NAME = tmpltest3)
)
)

Resources