Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Automatic Oracle startup on Windows Tips

Oracle Database Tips by Donald BurlesonJanuary 5, 2015

Question:  I have five instances on my Oracle Windows Server and I want to know how to automate the startup of Oracle when the Intel server and Windows OS are re-booted.  How can I make Oracle start automatically in Windows?

Answer:  Oracle provides two Windows scripts that assist DBAs with starting and stopping the Windows-based database: dbstart and dbshut.

For pre-written and pre-tested Oracle auto start scripts see the Oracle script download.
 
The dbstart utility reads the oratab file, shown in the example below. The oratab file will reside in  /etc. It contains three data items separated by colons:

oracle > cat /etc/oratab| wc -l

oracle > cat /etc/oratab

MYSID1:/usr/oracle/9.2.0:Y
MYSID2:/usr/oracle/11.1.0:Y
MYSID3:/usr/oracle/10.2.03:N

Above we see that there are three instances on this server, all on different releases of Oracle and the Oracle10g is marked "N", so that database will not re-start when the Windows OS re-starts.

1 - The first field is the Oracle SID.

2 - The second field is the home directory for that Oracle SID.

3 - The third column is a Y or N instructs Oracle whether to start or stop the particular database when either the dbstart or dbshut command is issued. The dbstart command simply parses the oratab file and starts those databases that have a Y in the third field. It also uses the ORACLE_HOME specified in the file to connect internally to the database and issue the startup command.

The dbstart command can be added to the Windows servers? initialization or run level scripts. This enables dbstart to be executed each time the machine is booted or when it changes run levels. The method for implementing this is platform specific, as we see below.

Automatic Starting and Stopping on Windows

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 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 (SRVC, INST).

The following command can be used to shutdown the instance with oradim:

C:\oracle9i\bin\oradim -shutdown -sid ORCL92 -shutttype SRVC,INST
'shutmode A

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 (ORACLE_HOME\database\OraDim.Log). This file should be checked for errors after each oradim command is executed.

The oradim utility provides more than just the ability to start and stop Windows databases. oradim can create and edit databases. It also allows DBAs to configure script-based installation mechanisms, bypassing the Oracle Database Configuration Assistant's graphical user interface (GUI).

For a reference of all oradim commands, use the oradim?help command.

Automating Oracle re-start within shell scripts

Please see these important notes on embedding Oracle re-start details within the oraenv utility .  For more information on stopping and starting Oracle automatically, see "Oracle Shell Scripting" by Jon Emmons.

 

 

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster