This discussion is archived
13 Replies Latest reply: Dec 18, 2012 6:51 AM by 980556 RSS

ORADIM -NEW

528303 Newbie
Currently Being Moderated
I have a Windows 2003 standard Server I am Running Oracle10g on. he Database has been having issues starting up succesfully after a reboot I decided to try to create a nem instance of the service after deleteing the old service using ORADIM.

The command I used to delete was;

oradim -delete -sid SID

I am now trying to recreate the instance but cannot using

%ORACLEHOME%\Oracle10\bin\oradim -NEW -SID SID -initpwd password
-startmode AUTO -pfile E:\Oracle10\admin\SERVICE\pfile\initSID.ora

The repsonse I get is...
DIM-00040: Invalid option for the -NEW command.

What option for the -NEW argument is it looking for
  • 1. Re: ORADIM -NEW
    Paul M. Oracle ACE
    Currently Being Moderated
    Try to change "-initpwd password " to "-syspwd password"

    See http://download-uk.oracle.com/docs/cd/B19306_01/win.102/b14304/create.htm#i1006533
  • 2. Re: ORADIM -NEW
    528303 Newbie
    Currently Being Moderated
    Thanks that worked but now I am back to my old problem. The instance does not start although the service does.

    I have to sqlplus into the Database and run Startup;

    to start the instance do you have any idea why this is happening?
  • 3. Re: ORADIM -NEW
    Paul M. Oracle ACE
    Currently Being Moderated
    Check that ORA_SID_AUTOSTART Registry entry is set to TRUE.
  • 4. Re: ORADIM -NEW
    528303 Newbie
    Currently Being Moderated
    It is thats what got me into this whole mess.
    I am now questioning the Registry key itself

    the Key is HKLM\Software\Oracle\KEY_Oracle10
  • 5. Re: ORADIM -NEW
    Paul M. Oracle ACE
    Currently Being Moderated
    Sorry, I don't understand. What's the point ?
  • 6. Re: ORADIM -NEW
    528303 Newbie
    Currently Being Moderated
    I have dione everything I know to get Oracle to startup from a reboot I have ended up having to use a script to start the instance because when the services start the instance remains IDLE

    Below is an article I found that started my ORADIM -NEW problem. The problem though describe here is what I am dealing with and I don't understand whhy I need to resort to a script???

    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Most Problem with the Win Service for the Database involve the service starting but the database not starting.

    If the Win service is set to automatically start when the server boots but the database does not start, you may have a improper registry setting or you may have a bad service.

    1. Check Task Manager for the ORACLE.EXE process. If it is present, then the service started.

    2. Check the Alert Log for the database. If the problem is not with the database, there will be no indication in the log that the database even tried to start.

    3. Check the oradim.log in the $ORACLE_HOME/database directory for errors. Check the date on the log file as versions before 9i did not date/time stamp the entries.

    If there are no errors in the logs then try and start the database.

    C:> sqlplus "/ as sysdba"
    connected to an idle instance
    SQL> startup

    If the database starts great, the problem is in the service.

    To check the Win service:

    Open the registry with regedit. Always back up the registry before making changes. Navigate to the key:

    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\oracle_home_name.

    There will be a key called:

    ORA_SID_AUTOSTART. SID is your database SID.

    This key should be set to TRUE. If not the server starts but does not start the database. There is also an ORA_SID_SHUTDOWN which you want to be TRUE so that if the server is shut down the service will shutdown the database.

    If you want to manually start the database set ORA_SID_AUTOSTART to FALSE. The service will start but not the database.

    Test the service.

    If the ORA_SID_AUTOSTART setting was the problem, change it to TRUE and then test the service by stopping and then restarting the service to see it the database automatically starts. If it does, then that fixed your problem......or maybe is didn't. Reboot the server to verify that the database will start automatically. Sometimes the service will work, only to fail again after a reboot. If the service fail after rebooting you need to recreate it. This is where the oradim utility comes in.

    Deleting a Service

    First delete or rename the oradim.log file.

    Next delete the current service.

    c:>oradim -delete -sid SID

    SID is of course you database SID. This may take a while so check the services to insure that the OracleServiceSID is removed before proceeding.

    Creating a new Service.

    Again we use oradim to recreate the service. This entire command is on one line.

    c:> oradim -new -sid SID -intpwd password -startmode AUTO -pfile ORACLE_HOME\admin\SID\pfile\initSID.ora

    This command does a lot and will take some time to complete (if startmode is set to AUTO it will start the database). It recreate the database password and sets the internal password to password. NOTE: oradim changes the internal password.

    The startmode determines if the service starts the database when it starts. If set to AUTO then the key ORA_SID_AUTOSTART is set to TRUE. If startmode is MANUAL then the key is set to FALSE.

    Check the oradim.log for errors. Finally, verify the service works as needed by starting and stopping it. Then test with a reboot. If the service fails try recreating it again.

    Scripting the Database Start.

    If you can't get the service to function properly you are left with scripting the starting of the database. Recreate the service with the -startmode set to MANUAL. Then create a batch file as follows:

    REM Wait for the server to start.
    sleep 60
    REM Start the database
    %ORACLE_HOME%\bin\sqlplus -s "/ as sysdba" @startup.sql
    exit

    The startup.sql file

    -- start the database
    startup
    exit

    Now schedule the batch file in the Windows Scheduler to run at startup.
  • 7. Re: ORADIM -NEW
    Paul M. Oracle ACE
    Currently Being Moderated
    I don't understand whhy I need to resort to a script???
    Yeah, you're not the first one with this problem, and my advise would have been exactly that. Unfortunately sometimes Windows has such problems...:-(
  • 8. Re: ORADIM -NEW
    528303 Newbie
    Currently Being Moderated
    So this is really a Windows issue and not an Oracle issue? Or is that just Oracle's stand on this because they don't know how to address it either?

    Thanks for you help anyway
  • 9. Re: ORADIM -NEW
    Paul M. Oracle ACE
    Currently Being Moderated
    Don't know how things are exactly. Maybe Oracle doesn't like Windows so much...:-)
  • 10. Re: ORADIM -NEW
    528303 Newbie
    Currently Being Moderated
    Paul,

    FYI
    This is what fixed my service not starting problem

    I deleted the registry string value ORA_SID_PFILE


    Although it was pointing to the absolute path for some reason it was causing my service error.

    I found this by comparing the registry keys to another server that was not giving me the issue

    Thanks again for your assistance I learned alot I did not know about Oracle by doing so

    Tim
  • 11. Re: ORADIM -NEW
    Paul M. Oracle ACE
    Currently Being Moderated
    You're welcome.

    That's good to know. Thanks for information.
  • 12. Re: ORADIM -NEW
    980556 Newbie
    Currently Being Moderated
    Your statement has wrong parameter
    %ORACLEHOME%\Oracle10\bin\oradim -NEW -SID SID -initpwd password
    -startmode AUTO -pfile E:\Oracle10\admin\SERVICE\pfile\initSID.ora

    should be
    %ORACLEHOME%\Oracle10\bin\oradim -NEW -SID SID -intpwd password
    -startmode AUTO -pfile E:\Oracle10\admin\SERVICE\pfile\initSID.ora


    NO i in the -intpwd parameter

    Cheers,
    Mike
  • 13. Re: ORADIM -NEW
    sb92075 Guru
    Currently Being Moderated
    THANKS for resurrecting 6+ YEAR old thread!