469,336 Members | 6,129 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

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

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
5 31887
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
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
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
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
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.

Similar topics

1 post views Thread by Alan Brown | last post: by
2 posts views Thread by Ping | last post: by
6 posts views Thread by bdj | last post: by
3 posts views Thread by Michael John | last post: by
reply views Thread by Zahi Savion | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.