Link to home
Start Free TrialLog in
Avatar of scpig
scpig

asked on

ORA-12154: TNS:could not resolve the connect identifier specified

I have a 2005 MS Vision Studio and would like to retrieve some data from an Oracle table that is on an Oracle 9i database schema, but  I have Oracle 10G on my machine.  When I run the VB code, I get "ORA-12154: TNS:could not resolve the connect identifier specified" error.  How do I resolve this issue?

This is the part of the VB code:

myConnection_GLOBAL = New OleDbConnection("Provider=msdaora;Data Source=frd01;User Id=xxx;Password=xxx;")
            mySqlDataAdapter_GLOBAL = New OleDbDataAdapter("SELECT BAN, BTN, NAME from TABLE", myConnection_GLOBAL)

This is what I have in my SQLNET.ORA file:
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
NAMES.DEFAULT.DOMAIN = chq.aci.ameritech.com
NAME.DEFAULT_ZONE = chq.aci.ameritech.com
SQLNET.AUTHENTICATION_SERVICES= (NTS)

This is what I have in my TNSNAMES.ORA file:
FRD01 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = our server hostname)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SID = frd01)
    )
  )
ASKER CERTIFIED SOLUTION
Avatar of denverskier
denverskier

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of schwertner
schwertner
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scpig
scpig

ASKER

tnsping frd01 comes back positive.
And I also commented out NAMES.DEFAULT.DOMAIN = chq.aci.ameritech.com in sqlnet.ora
but I still get the same ORA- error.
I do not have listener.ora file in my C drive.
What else could be wrong?

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial