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: After Creating New Dtabase...

Re: After Creating New Dtabase...

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Sat, 19 Jun 2004 14:30:49 +1000
Message-ID: <40d3c162$0$18668$afc38c87@news.optusnet.com.au>

"Arijit Chatterjee" <arijitchatterjee123_at_yahoo.co.in> wrote in message news:ea01504d.0406182018.4dda43dd_at_posting.google.com...
> Thanks Howard,
> Thanks for your king help.Atlast I got may FirstDB.As per your
> instruction I did all the step and successfuly recover my FirstDB.
> But in the case of SecondDb(After oracle_sid changing to seconddb) it
> is telling for username scott
> =======================================================================
> ERROR:
> ORA-12514: TNS:listener could not resolve SERVICE_NAME given in
> connect
> descriptor

That error means the tnsnames.ora is incorrect. It is saying "you are asking for a connection to X, and I only know of services A and B. So I can't forward your connection on to an instance".

I suspect that is because you set ORACLE_SID incorrectly. You're saying you set it to "seconddb", yet in previous posts you said you created something called "SecondDB". The difference in case is significant.

The way to check it, and fix it, is to find out what services your listener is *actually* aware of. Try this:

C:\> lsnrctl services

In my case, I get output like this:

C:\>lsnrctl services

LSNRCTL for 32-bit Windows: Version 9.2.0.1.0 - Production on 19-JUN-2004 14:25:26

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=mozart)(PORT=1521))) Services Summary...
Service "win92.dizwell.com" has 2 instance(s).   Instance "win92", status UNKNOWN, has 1 handler(s) for this service...     Handler(s):

      "DEDICATED" established:0 refused:0
         LOCAL SERVER

  Instance "win92", status READY, has 1 handler(s) for this service...     Handler(s):
      "DEDICATED" established:0 refused:0 state:ready
         LOCAL SERVER

Service "xxx.dizwell.com" has 1 instance(s).   Instance "xxx", status UNKNOWN, has 1 handler(s) for this service...     Handler(s):
      "DEDICATED" established:0 refused:0
         LOCAL SERVER

The command completed successfully

Notice the reference to "Service zzzzzzzz has X instances". The "zzzzzzzz" bit is what your tnsnames must reference. And the "Instance" part is what your ORACLE_SID must be set to, exactly. So in my case, my tnsnames.ora would have to have a bit in it as follows:

     (CONNECT_DATA =
       (SERVICE_NAME = win92.dizwell.com )

And my ORACLE_SID would have to be set to "win92" not 'WIN92'.

To remove unwanted services, use oradim. Type oradim /? at the command prompt to check for the full syntax, but the basic command will be

oradim -DELETE -SRVC XXXXX

Regards
HJR Received on Fri Jun 18 2004 - 23:30:49 CDT

Original text of this message

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