By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,323 Members | 1,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,323 IT Pros & Developers. It's quick & easy.

ORA-12154: TNS: could not resolve service name..when using hsodbc

P: n/a
Dear oracle gurus,

I am unable to get past the error ORA-12154: TNS: could not resolve
service name on my host when using hsodbc to talk to a remote mysql
database. i got from the meta link all the needed documenatation to
configure inithsodbc.ora,listener.ora,tnsnames.ora and related errors
Here is what it says

ORA-12154:
SQL> select * from all_catalog@demo;
select * from all_catalog@demo
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name

Resolution:
The database link uses a SQL*Net alias not specified
in the TNSNAMES.ORA of the database server.
Query the data dictionary to figure out the 'HOST'
specified for the database link:
select db_link, host from user_db_links;
or
select db_link, host from dba_db_links;
The 'HOST' value is the alias of the SQL*Net.
Please make sure it exists in the TNSNAMES.ORA file
present at the Oracle database server.

I did this query and the host value and SQL*Net alias match.
I dont know what is that i am missing

Your help is greatly appreciated.

-thanks,
avsrk
Jul 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
TC
Remote mysql database using tnsnames.ora ?

Or am I missing something over here ?

//tc

"Subrahmanyam Arya" <av***@mailcity.com> wrote in message
news:25**************************@posting.google.c om...
Dear oracle gurus,

I am unable to get past the error ORA-12154: TNS: could not resolve
service name on my host when using hsodbc to talk to a remote mysql
database. i got from the meta link all the needed documenatation to
configure inithsodbc.ora,listener.ora,tnsnames.ora and related errors
Here is what it says

ORA-12154:
SQL> select * from all_catalog@demo;
select * from all_catalog@demo
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name

Resolution:
The database link uses a SQL*Net alias not specified
in the TNSNAMES.ORA of the database server.
Query the data dictionary to figure out the 'HOST'
specified for the database link:
select db_link, host from user_db_links;
or
select db_link, host from dba_db_links;
The 'HOST' value is the alias of the SQL*Net.
Please make sure it exists in the TNSNAMES.ORA file
present at the Oracle database server.

I did this query and the host value and SQL*Net alias match.
I dont know what is that i am missing

Your help is greatly appreciated.

-thanks,
avsrk

Jul 19 '05 #2

P: n/a
av***@mailcity.com (Subrahmanyam Arya) wrote in message news:<25**************************@posting.google. com>...
Dear oracle gurus,

I am unable to get past the error ORA-12154: TNS: could not resolve
service name on my host when using hsodbc to talk to a remote mysql
database. i got from the meta link all the needed documenatation to
configure inithsodbc.ora,listener.ora,tnsnames.ora and related errors
Here is what it says

ORA-12154:
SQL> select * from all_catalog@demo;
select * from all_catalog@demo
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name

Resolution:
The database link uses a SQL*Net alias not specified
in the TNSNAMES.ORA of the database server.
Query the data dictionary to figure out the 'HOST'
specified for the database link:
select db_link, host from user_db_links;
or
select db_link, host from dba_db_links;
The 'HOST' value is the alias of the SQL*Net.
Please make sure it exists in the TNSNAMES.ORA file
present at the Oracle database server.

I did this query and the host value and SQL*Net alias match.
I dont know what is that i am missing

Your help is greatly appreciated.

-thanks,
avsrk


It doesn't really make sense to post this question without the
relevant *.ora files. No one here is clairvoyant and crystall balls
have sold out here.
General note: syntax errors like missing parentheses in tnsnames.ora
also result in ora-12154. Please use a magnifying glass to check
whether the () match.

Sybrand Bakker
Senior Oracle DBA
Jul 19 '05 #3

P: n/a
Hi there,
Obviously no..tnsnames.ora on the Oracle end is configured properly.
but i still get that error

Any clue,
avsrk

"TC" <do******@donotuse.com> wrote in message news:<qmoKa.18840$3d.12014@sccrnsc02>...
Remote mysql database using tnsnames.ora ?

Or am I missing something over here ?

//tc

"Subrahmanyam Arya" <av***@mailcity.com> wrote in message
news:25**************************@posting.google.c om...
Dear oracle gurus,

I am unable to get past the error ORA-12154: TNS: could not resolve
service name on my host when using hsodbc to talk to a remote mysql
database. i got from the meta link all the needed documenatation to
configure inithsodbc.ora,listener.ora,tnsnames.ora and related errors
Here is what it says

ORA-12154:
SQL> select * from all_catalog@demo;
select * from all_catalog@demo
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name

Resolution:
The database link uses a SQL*Net alias not specified
in the TNSNAMES.ORA of the database server.
Query the data dictionary to figure out the 'HOST'
specified for the database link:
select db_link, host from user_db_links;
or
select db_link, host from dba_db_links;
The 'HOST' value is the alias of the SQL*Net.
Please make sure it exists in the TNSNAMES.ORA file
present at the Oracle database server.

I did this query and the host value and SQL*Net alias match.
I dont know what is that i am missing

Your help is greatly appreciated.

-thanks,
avsrk

Jul 19 '05 #4

P: n/a
Hi sybrand,
I cross checked all the paranthesis and syntax. Interestingly, if i
were to edit the tnsnames.ora i face this problem. I tried launching
netasst and deleted and recreated the alias and the problem
disappeared.

Does it have some thing to do with not editing this file manually ???

-thx,
avsrk

sy******@yahoo.com wrote in message news:<a1**************************@posting.google. com>...
av***@mailcity.com (Subrahmanyam Arya) wrote in message news:<25**************************@posting.google. com>...
Dear oracle gurus,

I am unable to get past the error ORA-12154: TNS: could not resolve
service name on my host when using hsodbc to talk to a remote mysql
database. i got from the meta link all the needed documenatation to
configure inithsodbc.ora,listener.ora,tnsnames.ora and related errors
Here is what it says

ORA-12154:
SQL> select * from all_catalog@demo;
select * from all_catalog@demo
*
ERROR at line 1:
ORA-12154: TNS:could not resolve service name

Resolution:
The database link uses a SQL*Net alias not specified
in the TNSNAMES.ORA of the database server.
Query the data dictionary to figure out the 'HOST'
specified for the database link:
select db_link, host from user_db_links;
or
select db_link, host from dba_db_links;
The 'HOST' value is the alias of the SQL*Net.
Please make sure it exists in the TNSNAMES.ORA file
present at the Oracle database server.

I did this query and the host value and SQL*Net alias match.
I dont know what is that i am missing

Your help is greatly appreciated.

-thanks,
avsrk


It doesn't really make sense to post this question without the
relevant *.ora files. No one here is clairvoyant and crystall balls
have sold out here.
General note: syntax errors like missing parentheses in tnsnames.ora
also result in ora-12154. Please use a magnifying glass to check
whether the () match.

Sybrand Bakker
Senior Oracle DBA

Jul 19 '05 #5

P: n/a
You must have made a mistake when manually editing your tnsnames.
There's no rule prohibiting manual modifications in tnsnames (as a
matter of fact, I can't remember the last time I used a tool such as
netasst to edit it), but Oracle doesn't allow any syntax mistake at
all (such as extra parenthesis, anything misspelled, ...).

Daniel
I cross checked all the paranthesis and syntax. Interestingly, if i
were to edit the tnsnames.ora i face this problem. I tried launching
netasst and deleted and recreated the alias and the problem
disappeared.

Does it have some thing to do with not editing this file manually ???

-thx,
avsrk

Jul 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.