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;Da ta 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_SERV ICES= (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)
)
)
This is the part of the VB code:
myConnection_GLOBAL = New OleDbConnection("Provider=
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_SERV
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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?