i create db_link using syntax
create database link <link_name>
connect to <username> identified by <pwd>
when i issue a command like
select * from <able_name>@<link_name>;
i get this error
....TNS: could not resolve service name....
how can i fix this ...do i have to change something on INIT.ORA and TNSNAME.ORA????????
The service name is an alias in the tnsnames.ora on the server.
You are not putting < and > , right? :)
And the select would be
create database link some_db_link_name connect to some_user_name identified by the_password_of_some using 'some_alias_in_tnsnames';
select * from some_remote_table@some_db_link_name;
Hope it helps.
May be a problem in tnsnames.ora. Make sure that tnsnames.ora is on the server.
1)try to ping and tnsping your remote db to eliminate networking problems. If you get expected responses your network is doing good.
2)try to connect to your remote database using sqlplus.
if it lets you in there are no problems with your tnsnames.ora. That will be another good thing.
If there are problems with two checks above resolve them first. If there are no problems and your db link doesn't work post your error message here and we'll try to help.
Click Here to Expand Forum to Full Width