Can't connect to database after restarting, TNS Error

I'm a little new to Oracle 10g administration. I successfully installed it on Oracle Enterprise Linux. Immediately after installation, I was able to connect to the default ORCL database using sqlplus. However, when I restarted the computer, I was no longer able to do so, even after restarting the listener service.
Here is the error I get:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
The other strange thing is, whenver I create a new database using dbca, immediately after that I can connect via sqlplus. However, if I perform a shutdown/startup, I get the same error as above. Restarting the listener doesn't make any difference.
A tnsping to my new database is successful but I can't connect to it from sqlplus.
Running the 'lsnrctl services' command immediately after making the new database shows it running but after a shutdown/restart only the default EXTPROC service shows.
Can anyone tell me why this happens and how to resolve it? Is there some other service I have to restart? Also, why does the listener not know of the service when it is explicitly configured in the tnsnames.ora file?
Note that I change my ORACLE_SID to the service name before attempting to connect.
Everything in the listener and tnsnames files was coded by the software, not by me.
Thanks for any help.
Here is my listener file:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /opt/oracle/product/10gR2)
(PROGRAM = extproc)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP)(HOST = linux)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
______________________________________________

I played around a little by deleting and creating databases. Here is my current tnsnames file:
TESTDATA =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = TESTDATABASE)
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
I just made the database called TESTDATA. Here is the output of the command 'lsnrctl services', where the TESTDATABASE service refers to the database I just made:
[oracle@linux ~]$ lsnrctl services
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 11-JUL-2007 22:19:47
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=linux)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "TESTDATABASE" has 1 instance(s).
Instance "TESTDATABASE", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:13 refused:0 state:ready
LOCAL SERVER
Service "TESTDATABASEXDB" has 1 instance(s).
Instance "TESTDATABASE", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:972 state:ready
DISPATCHER <machine: linux, pid: 25175>
(ADDRESS=(PROTOCOL=tcp)(HOST=linux)(PORT=38662))
Service "TESTDATABASE_XPT" has 1 instance(s).
Instance "TESTDATABASE", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:13 refused:0 state:ready
LOCAL SERVER
Service "test2.class" has 1 instance(s).
Instance "test2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "test2_XPT.class" has 1 instance(s).
Instance "test2", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
[oracle@linux ~]$
Now I'm connecting and here is my result:
[oracle@linux ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 11 22:21:24 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect sys/pwd@testdata as sysdba
Connected.
SQL>
I am able to access the database from the OEM.
Now, here's what happens next. I shutdown the database from sqlplus and now when I restart, I get this message:
SQL> startup
ORA-24324: service handle not initialized
ORA-01041: internal error. hostdef extension doesn't exist
Now, if I exit sqlplus, enter again and try to connect, I get this error:
oracle@linux ~]$ sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 11 22:28:01 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> connect sys/pwd@testdata
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
SQL>
Any solutions? I appreciate your help.

Similar Messages

  • Oracle Enterprise Manager can't connect to database after installation

    Hello, I have a problem with Enterprise Manager. I installed Oracle 10g and the patch 10.2.0.2. After install, I could connect to database from SqlPlus without problems, but when I try to connect from AllPrograms - Oracle - DatabaseControl or since the Web browser with http://servername:1158/em nothing happen. I reviewed the status of dbconsole with emctl status dbconsole but the status is running. I recreated the repository with emca -deconfig.......-repos drop and emca -config ...... -repos create , but nothing happened. I reviewed some threads in this forum, but I didn't find the solution. Finally I could connect from the browser but with http://localhost:1158/em. Do you help me how can I connect from Database Control, because the operators in Computer Center should monitor the instance since there, and when I want to connect since my own PC how can do it?
    Thanks for your help and excuse my English, I am from Bogot&aacute; Colombia.
    Sincerely Rub&eacute;n

    Hi,
    Check the network connectivity between db server and pc from where u want to access em.
    Check the listener service.
    Check firewall settings, it should be off.
    Regards,
    Xaheer

  • Can't connect to database after installing Forms6i

    Hi,
    I have Oracle8i EE installed on RH6.2. The database was working fine until I installed Forms6i. Now when I try to start the listener I get the following error: TNS-01150: The address of the specific listener name is incorrect. I have checked the listener.ora file and everything seems correct.
    I am also getting the following error when I try to connect to svrmgrl: Error in loading shared libraries.
    If anyone could help me with these problems I would greatly appreciate it.
    Thanks,
    Mel

    Did you install Forms in a separate home?
    Check your ORACLE_HOME and LD_LIBRARY_PATH. If you want to use lsnrctl or svrmgrl your ORACLE_HOME should be set to the home your database software is installed in. It should be set to $ORACLE_HOME/lib.

  • Can I connect with Database using Session Bean

    Hi,
    I am new to EJB. I have small doubt.
    can I connect with Database using Session Bean.
    Regards,
    Murali.

    Double post of http://forum.java.sun.com/thread.jspa?threadID=687239&tstart=0

  • Getting error  "Can't connect to database DBMS is not supported in your current installation" in Demantra

    Hi,
    I have installed Microsoft Win x64(64-bit) Demantra 7.3.1.5 on Win 7(64-bit).
    When I try to open Business Modeler or Demand Planner or Business Logic Engine from :
    Start -> Oracle Demantra Spectrum , I am getting same error "Can't connect to database DBMS is not supported in your current installation"
    Below is a screenshot of same.
    I can connect to Collaborator Workbench though, but when I click on any of the "Planning Applications" from the menu in Collaborator Workbench window, again error is thrown.
    Error is  " Application could not be run! Error : undefined " as below :
    I have installed Oracle DB Enterprise edition 11gR2(64-bit)
    Please suggest where I am doing wrong.
    Regards,
    Vinni Sharma.

    Hi Sharma,
    Is this issue resolved? or still facing the same problem?
    We need to setup connections details in ds.ini file under demantra_installation\Demand Planner\Security Management folder on the server side.
    Regards,
    Akshay

  • After installing ios i'm can't connecting wi-fi, after installing ios i'm can't connecting wi-fi

    after installing ios i'm can't connecting wi-fi, after installing ios i'm can't connecting wi-fi

    Could you please be clearer, Could you please be clearer, could you please be clearer?
    You cannot connect at a wi-fi hotspot, or on a secure network?  Do you show any signal strength?  Do you show any available networks?

  • Can't connect to iTunes after new iOS download

    Can't connect to iTunes after new iOS download

    Hi,
    how exactly did you do that?
    I have the same problem, I tried everything (including upgrading my macbook pro to os x yosemite),
    but my iPhone 4S still won´t connect.
    Care to share how you resolved it?

  • Can't connect to wifi after updating to iOS 6

    can't connect to wifi after updating to iOS 6

    really stupid... but click on the arrow to the right of your netowrk and turn off auto-join

  • I can't connect to itunes store the alert error says "itunes could not connect to the itunes store. An unknown error occurred (0x80092013)"

    i can't connect to itunes store the alert error says "itunes could not connect to the itunes store. An unknown error occurred (0x80092013)"

    Hi all,
    I have the same problem with my Windows 8.1 laptop and my guess is that since I changed my Internet Provider who now delivers IPv6 addresses the problem occurs. A frieend who has a different provider does not have the problem in his home, but when he tries using iTunes at my home with my network he gets the same problem.
    I have already solved a previous problem with Outlook 2003 not being able to receive emails from my wifes GMail account although everything else worked fine. The solution here was to enter the IPv4 address of Google POP-Server in the hosts file, overriding the IPv6 address.
    Maybe something similar helps with this iTunes error.
    If someone knows the hostname of the iTunes Store server, it could be pinged and the IPv4 address could be determined and then entered in the HOSTS file.
    I'll continue trying in this direction and will post a solution if I find one.
    If someone has the iTunes server name or IPv4 address, please post it.

  • Can't connect to Database through JDeveloper with TNS connection

    Hello there,
    My work server we can connect to the server using TNS connection and it is working fine with Oracle SQL Developer that provide the type of connection. On the other hands, JDeveloper doesn't. I tried couple time to connect and I am unable to. Can someone tell me how to use a TNS type connection in JDeveloper?
    Thank you.

    I put server name for host name
    From http://asktom.oracle.com
    tell me what you consider to be the "server name".  do you want the sid?
    do you want the database name?
    do you want the global database name?  what is your concept of a "server name", we don't really have one  
    Ask Tom &amp;quot;Server Name of the Oracle Database&amp;quot;

  • Unable to Connect to Database (after server has been re-started)

    Hi,<BR><BR>I use Essbase Admin Services 7.1.3 and the server was not responding, therefore our IT guys re-started it. Since then I am unable to connect to one of the applications. I have tried to start/Stop the application but it just says "Application did not start". <BR><BR>There are 6 databases in this application altogether (3 data and 2 Currency). The application has been there for about 3 years (it holds historic sales data) and there has never been any problems with it.<BR><BR>When I tried to Start the application, in the message panel at the bottom it says "Error: 1013015 Unable to Connect to Database (2003)". It's as if there is a problem with this 2003 database but the 2002 and 2004 database are OK.<BR><BR>Has anyone ever had this problem and knows how to rectify it??<BR><BR>Thanks in advance.<BR><BR>Sarah

    It may be that the server restart corrupted the database. Go into database properties and uncheck the box start database with application and then try to restart the application.<BR><BR>You can try database validation, or simply reload the database from backup. But you can get the application up and the rest of the databases up by decoupling the database restart from the application start.<BR><BR>There will be a .xcp log file in your application directory (and possibly your database directory.) These might help Hyperion Support in identifying the cause of the problem. But the quickest solution would be to reload the database from backup. The serer and application logs can also provide help in identifying the problem.<BR><BR>One of the keys is to determine why the server is not responding before restarting the server. It may be that a single application is the source of problem. Typical causes are unscheduled free space restructures, application loads of large databases, and an occasional rogue process. Rather than rebooting the entire box, or even restarting the Essbase server, the safest approach is to only kill the job that is soaking up the cpu cycles, causing the server to be unresponsive. This requires identifying the offending process (esssvr.exe) and killingit. Often that restores the rest of the system to operations, giving you time to focus onthe offending application.<BR><BR>You learn thses things when you are pushing the server to its limits (or beyond). If it happens often, you need to do a serious performance audit of teh server and determine whether you need more power and/or memory. <BR><BR>And in any case, you are less likely to encounter this sort of problem in the future if you try to limit applications to a single database. This will allow a better utilization of system resources. And also, it's a good idea to shut down applications that you are not going to be using for a while. Every loaded app takes system resources whether or not it is doing anything. So review your list of apps that start on startup and consider unloading apps after completing batch processing. <BR><BR>Sorry about the long lecture, but I speak from somewhat painful experience. I hope that this will help you.

  • ODT v11 Beta Installation Problem - Can't connect to Database

    Hi, I'm having difficulties setting up the ODT 11.1.0.5.10 beta. I'm fairly new to Oracle so I apologise if I've missed something obvious!
    First of all I tried installing ODT 10.2.0.2.21 and that worked fine (after I copies tnsnames into the appropriate folder).
    However, after installing v11 I can't connect to any of our databases anymore, either through VS2005 of PL/SQL developer, which we normally use. When I try to set up a data connection (in VS Server Explorer) using ODP.Net, I get 'ORA-12154: TNS: Could not resolve the connect identifier specified'.
    If I try to make a connection using the .Net Framework data Provider for Oracle, I get 'ORA-12541: TNS: no listener'.
    Testing the connection using Oracle Net Manager, however, succeeds without a problem.
    i put the tnsnames file in there, so that's not the problem. I'm not sure if the installation worked properly, as there are a lot less files & folders in the new Home added for the beta than in the one added for v10.2
    Any thoughts?
    Thanks,
    Grant

    Yeah, you could be onto something with the path, thanks - it seems like the installer for the v11 Beta misses \bin off the end of the new Oracle home path, which causes problems. Since fixing that, I can now connect with PL/SQL developer.
    however, I am still facing one problem which my colleague also seems to have. We have an 8.1 client installed, and when we try to set up a connection with VS2005, it uses the tnsnames from the 8.1 client.
    There is also a strange issue whereby if you go into the advanced settings, the database name is only set to the first couple of characters of the actual name, which is probably why it isn't working. However, if I set the correct name in the advanced settings, when you come out of that dialogue into the standard connection dialogue, the database has reverted back to the first one in the list, putting me in a most annoying vicious circle..
    Even this problem has now taken a back seat as I am now unable to load the connection screen at all' getting a 'Package Load failure' message (it seems to think the package is using a GUID which isn't on the system). This remains even if i reinstall the v11 Beta. I'm not sure how I got into this situation, but it seems that there is some DLL registered in VS2005 which is now incorrect and doesn't get reset on uninstall/installation.
    If anyone has any thoughts on my myriad problems please share them with me!
    Thanks,
    Grant

  • Managed Server can not connect to Database

    I have a WebLogic cluster with three managed Server on 3 different machines.
    ManagedServer_1, ManagedServer_2, ManagedServer_3 (on Machine 3)
    Firstly, everything is ok. But when we changed some configuration on Firewall and make the WebLogic cluster could not connect to database. 3 servers change status from Running to Warning. Then, we undo all the changes to the Firewall configuration. 3 Servers could connect to Database again but still in warning state.
    It is strange that when I tried to restart ManagedServer_3. That server could not be up normally. It went to Admin state and all the datasources and connection pool could not be created. I tried to restart the machine 3 and start the server but it still failed to make server running normally.
    ( I made the test connecting to Database from Machine 3, everything is okie, I can got data from database, port 1521 opened )
    Has anyone got the same problem and how to fix it? Is that the problem with the admin server?

    JDBC DataSources/Connection pools are all at Domain Level. All we do is just target the datasources to AdminServer and Entire cluster (this will take care of all managed servers in the cluster). From Weblogic Console, TEST the data sources for any firewall issues. If this works from console, check from where you are accessing the Console like within the Firewall, that can access the database server. Even though the actual application is deployed only on cluster, still I would recommend targetting the datasources to both AdminServer and Cluster.
    Ravi Jegga

  • Can't connect to wifi after connecting to Starbucks wifi

    I know it sounds awkward that I can't connect to any wifi network after I connected to Starbuck's at&t wifi network, but that is the last time I've been able to. I'm not sure if it's just a coincidence or if that is the reason I haven't been able to after this. I had 2.1 since day 1 and it worked always perfectly until Starbucks that one time. A few days later, I updated to 2.2 and still everything is fine except for the wifi, same issue.
    Issue: Wifi is on and it just keeps showing "Choose a network..." with the icon spinning, but no networks show up. Ask to Join networks is on, but when I go to any program, it doesn't ask to join anymore. I've tried resetting network settings, turning on/off normally, doing a hard reset by holding down and not turning it off normally. I don't know what else to try. Nothing with the network router has changed, but even then I would expect it to list it at least or show all the other networks around the apartment, but none show up. My wife's phone connects to it fine. I've also tried clicking on Other... and then putting in the network name and it doesn't find anything. Something is abnormally wrong.
    Any ideas would be appreciated.
    Thanks.

    Hmmm.....
    It's worth a hard reset (press and hold the sleep/wake button and the Home button together, ignoring the 'slide to power down' message and then release them when the display blanks. Press the sleep/wake button until the logo appears and then wait for the restart which takes a little while...)
    Apart from that, it may be worth clearing Safari's cache, etc..... (Settings > Safari > Clear History/Cookies/Cache)
    In any event, 'Good luck'!!
    If all else fails it IS possible that some WiFi hotspots are VERY hot and emit more power than is really allowable in the Standards, resulting in 'frying' your WiFi receiver (possible but unlikely). If this is the case, return your iPhone to an Apple store with the 'WiFi not working' message but don't mention Starbuck's or anyone else.....just don't use Starbuck's WiFi service ever again!

  • Cannot connect to Database after install Developer Suite

    Help..
    I installed Oracle Database and everything seems work properly. I can connect to the database. (system/oracle@orcl)
    well, but after I install the developer suite, I can't connect to the database anymore.
    I did check the services and both OracleOraDb10g_home1TNSListener and OracleServiceORCL are started.
    I try to search help from google but I cannot solve the problem by myself. I also include two ora file below,
    tnsnames.ora
    =====
    # tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.
    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    ====
    listener.ora
    ===
    # listener.ora 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 = localhost)(PORT = 1521))
    ====
    everything seems should working properly but I still have problem cannot connect to the database. SQLPlus says "ORA-12154" and "ORA-12514"
    please help me.. I need to finish my project within next 2 weeks or I have to study one more year. T_T

    Hi ...
    The Oracle Doc points out as actions in this type of error:
    - If you are using local naming (TNSNAMES.ORA file):
    - Make sure that "TNSNAMES" is listed as one of the values of the NAMES.DIRECTORY_PATH parameter in the Oracle Net profile (SQLNET.ORA)
    - Verify that a TNSNAMES.ORA file exists and is in the proper directory and is accessible.
    - Check that the net service name used as the connect identifier exists in the TNSNAMES.ORA file.
    - Make sure there are no syntax errors anywhere in the TNSNAMES.ORA file. Look for unmatched parentheses or stray characters. Errors in a TNSNAMES.ORA file may make it unusable.
    - If you are using directory naming:
    - Verify that "LDAP" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
    - Verify that the LDAP directory server is up and that it is accessible.
    - Verify that the net service name or database name used as the connect identifier is configured in the directory.
    - Verify that the default context being used is correct by specifying a fully qualified net service name or a full LDAP DN as the connect identifier
    - If you are using easy connect naming:
    - Verify that "EZCONNECT" is listed as one of the values of the NAMES.DIRETORY_PATH parameter in the Oracle Net profile (SQLNET.ORA).
    - Make sure the host, port and service name specified are correct.
    - Try enclosing the connect identifier in quote marks. See the Oracle Net Services Administrators Guide or the Oracle operating system specific guide for more information on naming.According to the above and my LISTENER settings in listener.ora file which is...
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
      )there is one ')' missing closing parenthesis....
    So , modify your LISTENER settings ... according to the below....The difference is the ')' in bold....
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    Can you connect now.....????
    Regards,
    Simon

Maybe you are looking for