[GIS] How to connect an oracle 10g database to QGIS? (TNS:Could not resolve the connect identifier specified)

oracle-dbmsqgis

Trying to connect an oracle 10g database to QGIS. I'm getting the error below:

ORA – 12154: TNS:Could not resolve the connect identifier specified

Anybody ever seen this error, or could provide some guidance?

Best Answer

Check the tnsnames.ora file in the location c:\app\user\product\10.x.x\client\network\admin\tnsnames.ora

(if there is more than 1 products you may have to do it to both or 'de-install' oracle and then re-install the full client.)

There should be the database connections listed

DBANAME =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = IPADDRESS)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = DBSERVICE)
    )
  )

enter image description here

Related Question