ORA-12505 while creating new connection in Oracle SQL Developer - oracle

I installed few moments later the Oracle database XE 18.4.0.0.0 (18c).
Next I downloaded the Oracle SQL Developer tool and I tried to create a new connection, but I'm getting this error:
The master password is correct and the listerner is running, (UPDATED after #EdStevens reply):
C:\WINDOWS\system32> lsnrctl start
LSNRCTL for 64-bit Windows: Version 18.0.0.0.0 - Production on 22-OTT-2020 09:04:27
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Avvio di tnslsnr: attendere...
TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
Il file dei parametri di sistema Þ C:\app\gabri\product\18.0.0\dbhomeXE\network\admin\listener.ora
Ascolto su: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Connessione a (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATO del LISTENER
------------------------
Alias LISTENER
Versione TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
Data di inizio 22-OTT-2020 09:04:34
Tempo di attivitÓ 0 giorni 0 ore 0 min. 12 sec.
Livello trace off
Sicurezza ON: Local OS Authentication
SNMP OFF
File di parametri listenerC:\app\gabri\product\18.0.0\dbhomeXE\network\admin\listener.ora
Summary table degli endpoint di ascolto...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Summary table dei servizi...
Il servizio "CLRExtProc" ha 1 istanze.
L'istanza "CLRExtProc", stato UNKNOWN, ha 1 handler per questo servizio...
Il servizio "database" ha 1 istanze.
L'istanza "XE", stato UNKNOWN, ha 1 handler per questo servizio...
Il comando Þ stato eseguito
Here my listener.ora:
# listener.ora Network Configuration File: C:\app\gabri\product\18.0.0\dbhomeXE\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.
DEFAULT_SERVICE_LISTENER = XE
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\gabri\product\18.0.0\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\gabri\product\18.0.0\dbhomeXE\bin\oraclr18.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = PortatileGabriele)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
And tnsnames.ora:
# tnsnames.ora Network Configuration File: C:\app\gabri\product\18.0.0\dbhomeXE\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle configuration tools.
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
I hope that someone can help me!
Thanks in advance
EDIT:
C:\WINDOWS\system32>echo %ORACLE_HOMEd%
%ORACLE_HOMEd%
C:\WINDOWS\system32>echo %ORACLE_SID%
%ORACLE_SID%
C:\WINDOWS\system32>sqlplus / as sysdba'
SQL*Plus: Release 18.0.0.0.0 - Production on Gio Ott 22 14:27:19 2020
Version 18.4.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS: errore dell'adattatore del protocollo
Immettere il nome utente: SYSTEM
Immettere la password:
ERROR:
ORA-12560: TNS: errore dell'adattatore del protocollo
Immettere il nome utente:

First, the error 'listener does not know of sid' is absolutley correct. We see from 'lsnrctl status' that no database is registered with the listener. So until you get a database actually started and registered with the listener, nothing else matters.
Second, once you do get a database running, your SQL Dev 'connection type' of 'basic' means you are supplying all necessary connection info directly, and tnsnames.ora is not called into play. NOthing wrong with that, but if you do want to use tnsnames, then change your connection type to 'tns'. The necessary input fields with change accordingly.
Third, as mentioned, whether you use tns or basic connection, you want to specify service name, not sid.

Related

Cannot connect to a database in SQLDeveloper, I/O error: Network Adapter could not stablish the connection

I'm trying to connect to a local database in a computer (from someone else in fact) with Windows Pro and after a long time trying I finnaly installed SQL Express Edition and SQLDeveloper in the 64-bit version.
After the installation finished in the SQL Express Edition I was asked to write a password and got the following information for the database:
multitenant container database: localhost:1521
Connection database: localhost:1521/XEPDB1
EM Express URL: https://localhost:5500/em
And when I tried to connect in the SQLDeveloper I got "I/O Error: The Network Adapter could not establish the connection"
The tsnames.ora file is:
#tsnames.ora Network Configuration file: C:\app\OLIVER\product\18.0.0\dbhomeXE\NETWORK\ADMIN\tnsnames.ora
#Generated by Oracle configuration tools
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
and my listener.ora file is:
#listener.ora Network Configuration file: C:\app\OLIVER\product\18.0.0\dbhomeXE\NETWORK\ADMIN\listener.ora
#Generated by Oracle configuration tools
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\app\OLIVER\product\18.0.0\dbhomeXE)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:C:\app\OLIVER\product\18.0.0\dbhomeXE\bin\oraclr18.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = URIEL-PC)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
In the listener, there is a HOST called "Uriel-PC" and actually I don't know any Uriel but I figured that since I've got the Express Edition right from the Oracle page it should be right, so I wrote the info in the "New Database Connection" window in SQLDeveloper
Host: URIEL-PC
Port: 1521
SID: CLRExtProc
and I got the error I mention. I also tried changing the Host name in the listener.ora file and in the connection window in SQLDeveloper to localhost (As It was the one I got when installing the SQL Express Edition) and reloading the listener but that gave me the exact same error so I kept the original.
Also, I found a solution to the problem here http://www.rebellionrider.com/sql-developer-error-the-network-adapter-could-not-establish-the-connection/ where I should check if the listener was running by trying
C:\> lsnrctl status
which I tried and got
Conectándose a (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=URIEL-PC)(PORT=1521))) ESTADO del LISTENER
------------------------
Alias LISTENER
Versión TNSLSNR for 64-bit Windows: Version 18.0.0.0.0 - Production
Fecha de Inicio 09-MAR-2021 11:06:16
Tiempo Actividad 0 días 0 hr. 58 min. 57 seg.
Nivel de Rastreo off
Seguridad ON: Local OS Authentication
SNMP OFF
Servicio por Defecto XE
Parámetros del Listener C:\app\OLIVER\product\18.0.0\dbhomeXE\network\admin\listener.ora
Log del Listener C:\app\OLIVER\product\18.0.0\diag\tnslsnr\URIEL-PC\listener\alert\log.xml
Recibiendo Resumen de Puntos Finales...
DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=URIEL-PC)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
Resumen de Servicios... El servicio "CLRExtProc" tiene 1 instancia(s). La instancia "CLRExtProc", con estado UNKNOWN, tiene 1 manejador(es) para este servicio...
El comando ha terminado correctamente
(I kept the original output in spanish).
Edit:
The Oracle services running are OracleOraDB18Home1MTSRecoveryService and OracleOraDB18Home1TNSListener.
I tried to change the connection information in SQLDeveloper to:
Host name: localhost
Port: 1521
Service name: XEPDB1
and now I get "Listener refused the connection with the following error: ORA-12514, TNS:Listener does not currently know of service requested in connect descriptor".
In SQLPlus when I try to connect like this
sqlplus / nolog
connect sys/pass#localhost:1521/XEPDB1
I get the same error (ORA-12514: TNS:listener does not currently know of service requested in connect descriptor).

Cannot connect to Oracle XE 11g2

This has been driving me crazy for two days. I recently installed Oracle Express Edition 11g2 on my localhost (Windows 7 Enterprise). I can start the database and the listener, but I am unable to connect.
When I try connecting from SQL Developer with the following parameters:
Username: SYSTEM
Password: ***********
Hostname: localhost
Port: 1521
Service name: XE
I get the following error: An error was encountered... IO Error: The Network Adapter could not establish the connection. Vendor code 17002
Which apparently is SQL Developer speak for ORA-12541: TNS no listener.
When i try to connect from an SQL Command Line:
SQL> connect
Enter user-name: system
Enter password:
ERROR:
ORA-12638: Credential retrieval failed
My ORACLE_HOME is set to C:\oraclexe\app\oracle\product\11.2.0\server.
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\tnsnames.ora:
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = LOCALHOST)(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)
)
)
#bohort =
# (DESCRIPTION=
# (ADDRESS=(PROTOCOL=tcp)(HOST=LOCALHOST)(PORT=1521))
# (CONNECT_DATA=(SID=bohort))
# (HS=OK)
# )
-
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
(PROGRAM = extproc)
)
# (SID_DESC=
# (SID_NAME=bohort)
# (ORACLE_HOME= C:\oraclexe\app\oracle\product\11.2.0\server)
# (PROGRAM=dg4odbc)
# )
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
)
DEFAULT_SERVICE_LISTENER = (XE)
-
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\sqlnet.ora:
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES = (NTS)
Starting the listener seems to work fine:
C:\Users\<Username>>lsnrctl start
LSNRCTL for 64-bit Windows: Version 11.2.0.2.0 - Production on 04-F╔VR.-2015 10:
45:27
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Starting tnslsnr: please wait...
TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Production
System parameter file is C:\oraclexe\app\oracle\product\11.2.0\server\network\ad
min\listener.ora
Log messages written to C:\oraclexe\app\oracle\diag\tnslsnr\<Username>\listener\a
lert\log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc
)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 64-bit Windows: Version 11.2.0.2.0 - Produ
ction
Start Date 04-F╔VR.-2015 10:45:32
Uptime 0 days 0 hr. 0 min. 5 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File C:\oraclexe\app\oracle\product\11.2.0\server\network\a
dmin\listener.ora
Listener Log File C:\oraclexe\app\oracle\diag\tnslsnr\<Username>\listener
\alert\log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
I am sure the answer is out there somewhere but two days of googling have not led to a solution ...
Please use IP Address 127.0.0.1 instead of LOCALHOST in the listener and TNSNAMES file.
Restart the listener and try to connect again.

SQLplus client crash from remote machine oracle 11g XE

I have oracle 11g XE everything running well except that I can't connect to oracle via SQLplus client from remote mashine.
My server running centos with oracle 11g XE.
My listener.ora file looks like:
cat /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
listener.ora Network Configuration File:
SID_LIST_LISTENER = (SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
(PROGRAM = extproc)
) )
LISTENER = (DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
(ADDRESS = (PROTOCOL = TCP)(HOST = servername.domain.com)(PORT = 1521))
) )
DEFAULT_SERVICE_LISTENER = (XE)
My tnsnames.ora looks like:
XE = (DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = servername)(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)
) )
lsnrctl status shows:
-bash-4.1$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 21-MAR-2014
14:00:28
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to
(DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE))) STATUS of
the LISTENER
------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production Start Date
21-MAR-2014 13:39:10 Uptime 0 days 0 hr. 21 min. 18
sec Trace Level off Security ON: Local
OS Authentication SNMP OFF Default Service
XE Listener Parameter File
/u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora Listener
Log File
/u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/venera/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=servername.domain.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=servername.domain.com)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary... Service "PLSExtProc" has 1 instance(s). Instance
"PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "XE" has 1 instance(s). Instance "XE", status READY, has 1
handler(s) for this service... Service "XEXDB" has 1 instance(s).
Instance "XE", status READY, has 1 handler(s) for this service... The
command completed successfully
File /u01/app/oracle/product/11.2.0/xe/log/diag/tnslsnr/venera/listener/alert/log.xml when I try to connect:
21-MAR-2014 14:00:03 * service_update * XE * 0
WARNING: Subscription for node down event still pending
21-MAR-2014 14:00:28 *
(CONNECT_DATA=(CID=(PROGRAM=)(HOST=servername.domain.com)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647040))
* status * 0
21-MAR-2014 14:00:33 * service_update * XE * 0
21-MAR-2014 14:04:09 *
(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XE)(CID=(PROGRAM=C:\ORANT\BIN\PLUS80W.EXE)(HOST=client_name)(USER=client_username)))
* (ADDRESS=(PROTOCOL=tcp)(HOST=REMTE_IP)(PORT=56366)) * establish * XE * 0
my /etc/hosts looks like:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain
localhost6 localhost6.localdomain6
192.168.100.70 servername.domain.com servername
I have NAT and open port 1521
in /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
Btw I can connect to oracle local:
-bash-4.1$ sqlplus system#XE
SQL*Plus: Release 11.2.0.2.0 Production on Fri Mar 21 14:19:07 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter password:
Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 -
64bit Production
SQL>
I also try to run sqlplus as administrator. No luck. Any idea?
UPDATE CLIENT SITE:
C:\Users\ClientUsername>tnsping80 venera
TNS Ping Utility for 32-bit Windows: Version 8.0.6.3.0 - Production on 21-MAR-20
14 14:27:17
(c) Copyright 1997 Oracle Corporation. All rights reserved.
Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=servername.domain.com)(PORT=152
1))
OK (80 msec)
There is no support for Oracle Client 8 connecting to Oracle Database 11g
You need to upgrade your client.

TNS: No listener from other user

I'm trying to connect oracle database with non oracle user.
sqlplus user/password#sid
but it return
SQL*Plus: Release 11.2.0.1.0 Production on Wed Mar 12 22:34:08 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
ERROR:
ORA-12541: TNS:no listener
Enter user-name:
but if i try to connect with this line
sqlplus user/password
the connection was successful, so i need to know how fix it. this not happen with oracle or root users.
if check the port its alive for all users
tcp 0 0 192.168.2.5:1521 0.0.0.0:* LISTEN
UPDATE
tnsnames.ora
DBBRM75 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.5)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = dbbrm75.local)
)
)
LISTENER =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.5)(PORT = 1521))
listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = dbbrm75.local)
(ORACLE_HOME = /opt/app/oracle/product/11.2.0/db_1)
(SID_NAME = dbbrm75)
)
)
LISTENER =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.5)(PORT = 1521))
)
ADR_BASE_LISTENER = /opt/app/oracle
lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-MAR-2014 23:32:52
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.5)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 12-MAR-2014 23:20:49
Uptime 0 days 0 hr. 12 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /opt/app/oracle/diag/tnslsnr/vilya/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.5)(PORT=1521)))
Services Summary...
Service "dbbrm75.local" has 1 instance(s).
Instance "dbbrm75", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Try this
Windows + R (Open Run)
Type ---> services.msc
Select OracleServiceXe or OracleServiceOrcl and click on start or restart to start the service
Now try with your username/password for SQL Plus

How to setup a dblink from Oracle 10gR2 on Linux RedHat 64bit to Postgresql 8.3 on Linux RedHat 64bit too?

I try this query from Oracle :
select * from "a_table"#Postgres;
Here is the error message I get :
ORA-28545: error diagnosed by Net8 when connecting to an agent
Unable to retrieve text of NETWORK/NCR message 65535
ORA-02063: précédant 2 lines de RECORD
28545. 0000 - "error diagnosed by Net8 when connecting to an agent"
*Cause: An attempt to call an external procedure or to issue SQL
to a non-Oracle system on a Heterogeneous Services database link
failed at connection initialization. The error diagnosed
by Net8 NCR software is reported separately.
*Action: Refer to the Net8 NCRO error message. If this isn't clear,
check connection administrative setup in tnsnames.ora
and listener.ora for the service associated with the
Heterogeneous Services database link being used, or with
'extproc_connection_data' for an external procedure call.
Erreur à la ligne 1, colonne 25
Here is tnsnames.ora
Postgres =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SID = RECORD)
)
(HS=OK)
)
Here is listener.ora
LISTENER_HS =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1525))
(ADDRESS = (PROTOCOL = IPC)(KEY = PNPKEY))
)
)
)
SID_LIST_LISTENER_HS =
(SID_LIST =
(SID_DESC =
(SID_NAME = RECORD)
(ORACLE_HOME = /oracle/product/10.2.0)
(PROGRAM = hsodbc)
(ENVS = "LD_LIBRARY_PATH=/oracle/product/10.2.0/lib32:/oracle/product/10.2.0/hs/lib32:/user/lib")
)
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/10.2.0)
(PROGRAM = extproc)
)
)
Note after starting the listener, here is the output
$ lsnrctl status LISTENER_HS
LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 22-FEB-2012 13:45:09
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1525)))
STATUS of the LISTENER
------------------------
Alias LISTENER_HS
Version TNSLSNR for Linux: Version 10.2.0.3.0 - Production
Start Date 22-FEB-2012 13:45:05
Uptime 0 days 0 hr. 0 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /oracle/product/10.2.0/network/admin/listener.ora
Listener Log File /oracle/product/10.2.0/network/log/listener_hs.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1525)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "RECORD" has 1 instance(s).
Instance "RECORD", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
Here initPostgres.ora
HS_FDS_CONNECT_INFO = Postgres
HS_FDS_TRACE_LEVEL = DEBUG
HS_FDS_TRACE_FILE_NAME = /oracle/product/10.2.0/hs/log/postgres.trc
HS_FDS_SHAREABLE_NAME = /usr/lib/psqlodbc.so
set ODBCINI= /etc/odbc.ini
/oracle/product/10.2.0/hs/log/record.trc is empty.
What am I missing ?
Oracle 10gR2
Linux RedHat 64bit
Postgresql 8.3
Linux RedHat 64bit
EDIT:
When I try to check manually that the ODBC driver is up and running, this is what I get :
$ isql postgres USER PASS -v
[01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/psqlodbc.so' : /usr/lib/psqlodbc.so: Ne peut ouvrir le fichier d'objet partagé: Aucun fichier ou répertoire de ce type
[ISQL]ERROR: Could not SQLConnect
I have asked the same question on Oracle forum and I get a response.
Simply, I can't use hsodbc on Linux 64bit there is no port from Linux 32bit.
Instead, I must use DG4ODBC incompatibe with my Oracle 10.2.0.3.
Then my alternatives are either :
install Database Gateway for ODBC 11.2.0.3
migrate from Oracle 10.2.0.3 to Oracle 10.2.0.4 or greater
or apply the patch 5965763
Detailed reponse is here.

Resources