Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: weird problem with database link and synonym

Re: weird problem with database link and synonym

From: WF Holmes <wfholmes_at_yahoo.com>
Date: 2 Oct 2001 06:04:45 -0700
Message-ID: <a43c7f58.0110020504.2333d381@posting.google.com>


If the object you're trying to access is in database B while logging in to database A, then look at the tnsnames.ora file on the database server to see if the alias used in the synonym (DBL) can be resolved, i.e. see if the alias is defined in the database server's tnsnames.ora. If it isn't, then define it and then try the query again.

"craig.ballingall" <a_at_b.com> wrote in message news:<3bb8dde6_1_at_mk-nntp-1.news.uk.worldonline.com>...
> sounds like its looking to a service called q1
>
> are you entering "sqlplus scott/tiger @q1" or sqlplus "scott/tiger_at_q1"
>
> if i'm being dopey just ignore me, i've been sat if front of Microsnot SQL
> for 6 months
> "Anonymous Developer" <orakcle_at_yahoo.com> wrote in message
> news:de75c082.0110010251.3934ea1f_at_posting.google.com...
> > Here is the problem:
> >
> > ------------------------------
> > $ sqlplus scott/tiger
> >
> > SQL> CREATE SYNONYM W_T FOR W_T_at_DBL;
> > ------------------------------
> >
> > Now, I am able to run the follwing query within sqlplus session:
> >
> > ------------------------------
> > SQL> SELECT * FROM w_t ;
> > ------------------------------
> >
> > But the same query from the command line and SQL script file
> > (as below)
> > ------------------------------
> > $ cat > q1.sql
> > SELECT *
> > FROM w_t;
> > <Ctrl-D>
> > $ sqlplus scott/tiger @q1
> > ------------------------------
> >
> > produces the following well-known error:
> > ORA-12154: TNS:could not resolve service name
> >
> > Besides, "tnsping DBL" succeeds.
> >
> > Platform: Oracle 8.1.6 / Linux 2.2.16
> >
> > Any idea?
Received on Tue Oct 02 2001 - 08:04:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US