The following is from the
book
Oracle Utilities
Starting and Stopping Oracle on Windows with
oradim
The dbstart and dbstop shell scripts do not exist on Windows
platforms. Consequently Oracle database startup and shutdown is
implemented completely differently. The oradim utility provides
more than just the ability to start and stop Windows databases.
Windows oradim can create and edit databases. It also allows DBAs
to configure script-based installation mechanisms.
The oradim utility is used on the Windows
platform to perform these tasks.
C:\oracle9i\bin\oradim -startup -sid ORCL92 –usrpwd
manager
-starttype SRVC,INST -pfile
C:\oracle9i\admin\ORCL92\pfile\init.ora
• startup – Indicates that the specified instance should be started.
• sid – The SID of the database to start.
• usrpwd – The password for the database user.
• starttype – Specifies whether to start the instance, the service, or
both
Startup -
The following command can be used to start
the instance with oradim:
C:\oracle\bin\oradim
–startup –sid
MYSID
Shutdown -
The following command can be used to shutdown
the instance with oradim:
C:\oracle\bin\oradim -shutdown -sid MYSID -shutttype
SRVC,INST –shutmode A
Create instance -
The following command can be used to create an instance with oradim:
C:\oracle\bin\oradim
–new –sid MYSID –intpwd
<pwd> –maxusers 20 startmode auto –pfile
initMYSID.ora
Delete Instance -
The following command can be used to delete an instance with oradim:
C:\oracle\bin\oradim
–delete –sid
MYSID
Notice that no password is needed to perform
this task.
The shuttype parameter specifies what is to be
stopped – the service (SRVC), the instance
(INST), or both (SRVC, INST). The shutmode
specifies the method that should perform the
shutdown – (A)bort, (I)mmediate, or (N)ormal.
Each operation, regardless of success, is
logged in the oradim log file.
The ORADIM utility only exists on Windows. It is the
command-prompt tool that creates, deletes, stops, and starts instances.
If you have UNIX scripts that create databases, you can still use them
(modified of course), but you will need to run ORADIM first to actually
create the Instance. This command is what actually creates the
Windows Service that runs the Instance.
An example of creating a
new Instance for ORCL is:
Oradim –new –sid ORCL –intpwd –maxusers
4 startmode auto –pfile initSID.ora
An example of
deleting the Instance for ORCL is:
Oradim
–delete –sid ORCL
An example of a shutdown and startup.
These can be used in scripts, such as for a cold backup.
Oradim –shutdown –sid ORCL –usrpwd
/ -shuttype inst, srvc –shutmode i
Oradim –startup –sid ORCL
For a reference of all oradim commands, use
the oradim scripts here.
oradim script download
Oracle Windows oradim Utility
Auto start Oracle Automatically
Batch script to start Oracle Windows services
Advanced
Oracle Utilities - Oracle ORADIM Utility
How
to start Oracle Windows services
Oracle Utilities
Starting and Stopping Oracle on Windows
Oracle on Windows for Unix Users