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: ORA-12154: TNS:could not resolve service name in sql+ only

Re: ORA-12154: TNS:could not resolve service name in sql+ only

From: Debbie <DEBBIELOKE_at_YAHOO.CO.UK>
Date: 20 Sep 2002 02:00:48 -0700
Message-ID: <eec445c4.0209200100.2f26a1ac@posting.google.com>


"Howard J. Rogers" <howardjr2000_at_yahoo.com.au> wrote in message news:<x8ui9.36219$g9.103421_at_newsfeeds.bigpond.com>...
> "Debbie" <DEBBIELOKE_at_YAHOO.CO.UK> wrote in message
> news:eec445c4.0209190644.47df6697_at_posting.google.com...
> > A bit of history;
> > I have a machine (w2k) set up with Oracle 9i that has a database
> > called Prod. The database works perfectly, i can connect to it, make
> > changes and have no issues with it whatsoever.
>
> Sorry: we need to be more specific here. Are you working *on that machine*
> when you can connect perfectly? Or are you accessing it over the network. If
> you're doing it all on the machine directly, then it's very likely to work
> without a hassle, because you aren't actually putting Net8 to the test yet.

Sorry I didn&#8217;t make myself very clear. When I sit at PC1 Oracle runs perfectly. This is where it is installed so I am not accessing it over the network.
>
> > I have now installed Oracle onto a second PC (w2k) and am trying to
> > connect to the database on the original PC.
> > I have set up a database called Prod1 with a host name of the first PC
> > and I can see the database and data. All works well, until this
> > error!
> >
> > I get this error message when I try to connect to SQL+ on the second
> > pc. I am connected to the database (prod1), can see all information
> > in the database and make changes to it (that appear on both PC's) via
> > Enterprise manager. It is only when trying to launch SQL+ that this
> > message appears.
> >
>
> Nope... you've gone off the deep end on this one. It's not clear from your
> description what's happening, what you're typing, and a goodly much else
> besides.

I have Oracle installed onto PC2 and am trying to connect to the database on PC1. I have therefore set up a database called Prod1 on PC2 with the same details as the Prod database on PC1 so I can see all the data on the Prod database from PC2. Im basically connecting to the database on PC1 through PC2, however if I try to launch SQL+ on PC2 and connect to the database I get the error.
>
> I presume you are saying that, whilst seated at PC2 (which is running the
> PROD1 database) you are trying to connect, via SQL*Plus, to the PROD
> database on PC1. Is that right?

This is correct, sorry for not making it clear.
>
> > Here is my tnsnames.ora file, which I can&#8217;t see any errors with;
> >
> > # TNSNAMES.ORA Network Configuration File:
> > C:\oracle\ora92\NETWORK\ADMIN\tnsnames.ora
> > # Generated by Oracle configuration tools.
> > PROD1.ORANZ.CO.UK =
> > (DESCRIPTION =
> > (ADDRESS_LIST =
> > (ADDRESS = (PROTOCOL = TCP)(HOST = oranz02)(PORT = 1521))
> > )
> > (CONNECT_DATA =
> > (SERVER = DEDICATED)
> > (SERVICE_NAME = prod)
> > )
> > )
> >
>
> See, this is where I get confused. You've a service alias called PROD1....
> which is connecting to the service PROD. Yet earlier, I thought you said you
> had a database called PROD running on your first machine, and PROD1 running
> on your second machine. Who can say what you're trying to connect to and
> from where... 'cos I can't tell.

I am trying to connect to the prod database on PC1 from PC2, and this is the only way I can think of doing it. I can view the data from PC2 and make changes, but can&#8217;t connect through SQL+
>
> Is this the TNSNAMES.ORA file from the first machine, or the second?

This is from PC2.
>
> > When I type the following command line into SQL+ -
> > Connect mis_staging/mis_staging_at_PROD1.ORANZ.CO.UK;
> > I get the nasty message;
> > ORA-12154: TNS:could not resolve service name.
> >
>
> Check that you haven't got multiple copies of the tnsnames.ora floating
> around on your hard disk. Check that sqlnet.ora doesn't have a line such as
> "SQLNET.DEFAULT_DOMAIN" (delete it if so, and try again).

It did have this line, and I have now removed it thank you!
>
> Otherwise, write back with more precision as to what you are typing, where,
> and attempting to do what.

I am just trying to connect to a database called prod on PC1 from PC2 and am not sure how to do this effectively. Im sorry for the confusion and greatly appreciate all of your help. Thank you again!!
>
> Regards
> HJR
>
> > I am at a complete loss with this. I have only been using Oracle a
> > couple of weeks and we are testing it to see if it is going to work
> > for us in a development capacity. I therefore purchased the media
> > pack but no support with the database and this is proving to be a real
> > nightmare. Please help!
Received on Fri Sep 20 2002 - 04:00:48 CDT

Original text of this message

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