I want to access an Oracle Database (with SDE) from Qgis 2.4.
I have tried many different options from within the window Create a new Oracle Connection but I always get an error message (ORA-12514: TNS:listener does not currently know of service requested in connect descriptor or similar messages). I know however that the DB is working and listening. I know the correct host, the correct port and I have valid username / password.
The IT support here gave me 2 (independent) pieces of advice but I'm not sure how to implement them with Qgis:
- "Does your client (Qgis) know about the correct tns_admin directory?"
- "Make sure that LDAP is listed first: NAMES.DIRECTORY_PATH = (LDAP, TNSNAMES,ONAMES)"
Anyone has an idea?
Thanks a lot in advance!
PS: sorry if my title is not very explicit. I'm not sure how to best formulate it.
EDIT [30.09.2014]
I have moved a little bit forward and I have edited the file tnsnames.ora located under C:\OraClient11g\product\11.2.0\client_1\NETWORK\ADMIN:
name_of_my_db =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = *********)(PORT = 1568))
)
(CONNECT_DATA =
(SERVICE_NAME = name_of_my_db)
)
)
Will Qgis read this file or does it require its own copy of it? If yes, where should it be located? If no, how does it know where tnsnames.ora is stored? Should there be an entry in the registry?
By the way, my sqlnet.ora file (also located in C:\OraClient11g\product\11.2.0\client_1\NETWORK\ADMIN) looks like this:
# sqlnet.ora Network Configuration File: C:\oracle\product\10.2.0\NETWORK\ADMIN\sqlnet.ora
# Generated by Oracle configuration tools.
################
# Filename......: sqlnet.ora
# Name..........: $Id: sqlnet.ora,v 1.3 2004/11/22 13:47:17 oracle Exp $
# Date..........: $Source: /data/repository/cvsroot/ORACLE/env_sqlnet/indus/sqlnet.ora,v $
#
################
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (LDAP,TNSNAMES,ONAMES)
SQLNET.CRYPTO_SEED = "************************"
NAMES.PREFERRED_SERVERS =
(ADDRESS_LIST =
(ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1568))
(ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1568))
(ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1568))
(ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1568))
(ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1529))
(ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1527))
(ADDRESS = (COMMUNITY = ************************)(PROTOCOL = TCP)(Host = ************************)(Port = 1528))
)
NAMES.DEFAULT_DOMAIN = ************************
SQLNET.EXPIRE_TIME = 0
EDIT 2 [30.09.2014]
According to my DB Admin, I shouldn't even need the tnsnames.ora, because the connection should work through LDAP... Not sure whether or not this information brings anything relevant for my problem?