dcsimg
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Can't access database after power outage

  1. #1
    Join Date
    Feb 2018
    Posts
    3

    Can't access database after power outage

    I could access the database before the power outage. From what I've read, it is a problem with the environment variables, but they are correct. Not sure what else to add.


    C:\Documents and Settings\konoca>sqlplus / as sysdba

    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 21 09:17:08 2018

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    ERROR:
    ORA-01031: insufficient privileges


    Enter user-name: dbaprod
    Enter password:
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist


    Enter user-name:
    C:\Documents and Settings\konoca>sqlplus dbaprod/Get0ut@firsp

    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Feb 21 09:17:54 2018

    Copyright (c) 1982, 2005, Oracle. All rights reserved.

    ERROR:
    ORA-12541: TNS:no listener


    Enter user-name:


    C:\Documents and Settings\konoca>lsnrctl stat

    LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 21-FEB-2018 09:18
    :46

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

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=10.10.1.16)(PORT=1521)))

    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
    ction
    Start Date 18-FEB-2018 08:52:13
    Uptime 3 days 0 hr. 26 min. 33 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File E:\oracle\product\10.2.0\network\admin\listener.ora
    Listener Log File E:\oracle\product\10.2.0\network\log\listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.10.1.16)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
    Services Summary...
    Service "FIRSP" has 1 instance(s).
    Instance "FIRSP", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully

    C:\Documents and Settings\konoca>echo %ORACLE_HOME%
    E:\oracle\product\10.2.0

    C:\Documents and Settings\konoca>echo %ORACLE_SID%
    firsp

    C:\Documents and Settings\konoca>

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

    #TRACE_LEVEL_LISTENER = SUPPORT
    #TRACE_DIRECTORY_LISTENER = E:\oracle\product\10.2.0\network\trace
    #TRACE_TIMESTAMP_LISTENER = ON

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = FIRSP)
    (ORACLE_HOME = E:\oracle\product\10.2.0)
    (PROGRAM = extproc)
    )
    )


    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 10.10.1.16)(PORT = 1521))
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    )

  2. #2
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,165
    First you need to make sure that the database service is started. When you use dbca to create databases in Windows with 10g, but
    default the service is not set to auto start. So make sure that the service is set to auto start in the services control panel, and if it is
    stopped, you need to start it. In order to do anything your user needs to be in the Admin group.

    Assuming that the service is started and your user is in the Windows admin group, then you need to use oradim to set the database
    to startup when the service starts.

    Code:
    oradim -NEW -SID FIRSP -SYSPWD   -STARTMODE auto -SRVCSTART system -SHUTMODE immediate
    https://docs.oracle.com/cd/B19306_01...e.htm#NTQRF352

    Finally you need to initially log in using the sys user. Since you will need the sysdba privilege to connect to the database if it isn't running.
    You will need the sys password to run the oradim command above as well.
    this space intentionally left blank

  3. #3
    Join Date
    Feb 2018
    Posts
    3
    To get into the database after the server has been rebooted I log into sqlplus and then issue the startup command. I'm not able to login to sqlplus because of the error messages I mentioned.

    I issued the command you suggested. I got the following error:

    DIM-00019: create service error
    O/S-Error: (OS 1073) The specified service already exists.

  4. #4
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,165
    Sorry, I have not used this command in awhile as all of my Oracle databases are on Redhat.

    Code:
    oradim -EDIT -SID FIRSP -SYSPWD   -STARTMODE auto -SRVCSTART system -SHUTMODE immediate
    You needed edit not new. You should also post the commands that you are using and use sys as sysdba to conect.
    You should also make sure that your environment variables are set in the control panel, system advanced features.

    Code:
    SET ORACLE_HOME=E:\oracle\product\10.2.0
    SET LD_LIBRARY_PATH=E:\oracle\product\10.2.0\lib
    SET TNS_ADMIN=E:\oracle\product\10.2.0\network\admin
    SET ORACLE_SID=FIRSP
    SET PATH=%ORACLE_HOME%\bin;%PATH%
    this space intentionally left blank

  5. #5
    Join Date
    Feb 2018
    Posts
    3
    Thanks so much for your reply! I entered all the environment variables and was able to get in!

    Thanks so much for your help! I really appreciate it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width