Re: Cannot connect to Oracle 10g database

From: Raj <jkamaraj_at_gmail.com>
Date: Wed, 30 Apr 2008 11:46:36 -0700 (PDT)
Message-ID: <2a0c0dd5-42a4-4ebe-a91e-83a6b0e68265@w8g2000prd.googlegroups.com>


On Apr 23, 5:40 am, Noons <wizofo..._at_yahoo.com.au> wrote:
> Rajwrote,on my timestamp of 23/04/2008 10:30 AM:
>
> > From SQL PLus, I cannot connect to our Oracle 10g database. The
> > following errors shows up in the SQL-Plus.
>
> > ORA-12514: TNS:listener does not currently know of service requested
> > in connect
> > descriptor
>  > snippage
> > What could be the problem and how to fix it?
>
> > Any help you can provide is greatly appreciated.
>
> The problem is that the description of the service
> name in your tnsnames.ora entry does not match the
> service names the listener knows about.
> The most common case is when for example the
> SERVICE_NAME entry is set to the SID in the server,
> instead of the fully qualified domain name of the
> database.
> Try this:
> Run the following query in the server logged on as
> sys or system:
> select * from global_name;
> then pick the resulting string and set the SERVICE_NAME
> parameter in the corresponding tnsnames.ora entry in the
> client to that string. Then try the connect again.

Hello Noon,
When I try to run this SQL, I got an error saying that database is not open

SQL> connect sys/admin_at_orcl10g as sysdba Connected.
SQL> select * from global_name;
select * from global_name

              *
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only

I tried to open the database using the following alter database open. It failed with the below message:

SQL> alter database open
  2 /
alter database open
*
ERROR at line 1:
ORA-01157: cannot identify/lock data file 7 - see DBWR trace file ORA-01110: data file 7:
'C:\ORACLE\PRODUCT\10.2.0\ORADATA\EMEA\STAHOP_DATA01.DBF' I ran the lsnrctl status and got the following output:

C:\Documents and Settings\Administrator>lsnrctl status

LSNRCTL for 32-bit Windows: Version 10.2.0.3.0 - Production on 30- APR-2008 11:21
:05

Copyright (c) 1991, 2006, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) STATUS of the LISTENER


Alias                     LISTENER
Version                   TNSLSNR for 32-bit Windows: Version
10.2.0.3.0 - Produ
ction
Start Date                12-APR-2008 03:11:41
Uptime                    18 days 8 hr. 9 min. 24 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF

Listener Parameter File C:\oracle\product\10.2.0\db_1\network\admin \listener.o
ra
Listener Log File C:\oracle\product\10.2.0\db_1\network\log \listener.log

Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe \EXTPROC1ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=support-db3)(PORT=1521))) Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl10g" has 1 instance(s).
  Instance "orcl10g", status READY, has 1 handler(s) for this service...
Service "orcl10g_XPT" has 1 instance(s).   Instance "orcl10g", status READY, has 1 handler(s) for this service...
Service "orcl10ga" has 1 instance(s).
  Instance "orcl10ga", status READY, has 1 handler(s) for this service...
Service "orcl10gaXDB" has 1 instance(s).   Instance "orcl10ga", status READY, has 1 handler(s) for this service...
Service "orcl10ga_XPT" has 1 instance(s).   Instance "orcl10ga", status READY, has 1 handler(s) for this service...
The command completed successfully

Here orcl10ga works fine but the orcl10g fails to connect from SQL Plus with the
ORA-12514: TNS:listener does not currently know of service requested error.

Here is my tnsnames.ora file contents:
# tnsnames.ora Network Configuration File: C:\oracle\product \10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORCL10G =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = support-db3.actuate.com)(PORT = 1521))

    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl10g)
    )
  )

AMTRAKMA =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = support-db3.actuate.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)
      (SERVICE_NAME = AmtrakMaximo)

    )
  )

UNILOG =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = support-db3.actuate.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)
      (SERVICE_NAME = UNILOG)

    )
  )

ORCL10GA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = support-db3)(PORT = 1521))     )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl10ga)
    )
  )

EDGE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = support-db3.actuate.com)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)
      (SERVICE_NAME = EDGE)

    )
  )

ORCL10GUC =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = support-db3.actuate.com)(PORT = 1521))

    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl10guc)
    )
  )

and listener.ora # listener.ora contents

Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin \listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =

      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)

    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = support-db3.actuate.com)(PORT
= 1521))

    )
  )

Thank you for any guidance you may provide.

Regards.
Raj Received on Wed Apr 30 2008 - 13:46:36 CDT

Original text of this message