Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generic connectivity with odbc gives OracleORA-12154 error

Status
Not open for further replies.

TNB

Programmer
Dec 11, 2001
4
DK
Hi
I am trying to setup generic connectity in Oracle 8.17 to connect to an sqlserver database from within sqlplus. The Steps I have used is:
1. Install Generic Connectivity (already with oracle server)
2. check data dictionary tables (ok)
3. Setup ODBC sql driver from Microsoft (2000.80.194) with dsn name OrigoAKE (test works)
4. Added new entry in to tnsnames.ora:
hsodbc=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=thomasb)(PORT=1521))
(CONNECT_DATA=(SID=hsodbc))
(HS=OK)
)
5. Added to listener.ora:
(SID_DESC=
(SID_NAME=hsodbc)
(ORACLE_HOME=H:\Oracle\Ora81)
(PROGRAM=hsodbc)
)
6. Finally in HS/Admin i created inithsodbc.ora with:
HS_FDS_CONNECT_INFO = OrigoAKE
7. I then tried out the connection by loggin on normal to my oracle database:
create database link hsodbc using 'hsodbc';
select * from origoadm.tablename@hsodbc produces the error
ORA-12154: TNS:could not resolve service name (I now that this means it can't use the entry in tnsnames.ora but I can't figure out what is wrong?)

Am I missing something here along the line? Do I have to create a new Oracle_Home for generic connectivity to work?

Thanks in advance!
TNB
 
I solved the problem myself.

I had to change the service entry in tnsnames.ora from just hsodbc to hsodbc.machinename. Apparently the domain is mandatory.

TNB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top