Oracle stand-alone environment for booting the database automatically

Source: Internet
Author: User

Both the Windows environment and the UNIX environment enable automatic database startup

In the Windows environment:

The experimental method is relatively simple, by modifying the registry or by using the Oradim command:

Oradim-edit <SID>-startmode [auto|manual]-shutmode [Nomal|immediate|abort]

UNIX Environment:

Experiment with the Dbstart command that comes with the database.

Command: Dbstart + {oracle_home full path }

Principle:

1. During the operating system startup process, read the/etc/oratab file to determine if there are any databases that need to be started automatically (n means not auto-start, y for auto-start)

ora10g:/u01/app/oracle/product/10.2.0:Y <<<<<<<<< Auto Start
Catdb:/u01/app/oracle/product/10.2.0:n <<<<<<<<< do not start automatically

2. Invoke the Dbstart command to start the Listener and database

To view the full path of the script as $oracle_home/bin/dbstart, you will notice:

listener startup is affected by environment variable Oracle_home_listner

Take the Linux environment operation process as an example:

1. Edit the/etc/oratab file as follows

<p><span style= "FONT-SIZE:14PX;" >[[email protected] bdump]$ Cat/etc/oratab # This file was used by ORACLE utilities.  It was created by Root.s  h# and updated by the Database Configuration Assistant when creating# a Database.</span></p><p><span Style= "FONT-SIZE:14PX;" ># a colon, ': ', is used as the field terminator.  A New Line terminates# the entry.  Lines beginning with A Pound sign, ' # ', is comments.## Entries is of the form:#   $ORACLE _sid: $ORACLE _home:<n|  y>:## the first and second fields is the system identifier and home# directory of the database respectively.  the Third filed indicates# to the Dbstart utility that the database should, "Y", or should not,# "N", being brought up at Syste M boot time.## multiple entries with the same $ORACLE _sid is not allowed.# #ora10g:/u01/app/oracle/product/10.2.0:y <& Lt;<<<<<<<<<<<<<<<<<<catdb:/u01/app/oracle/produCt/10.2.0:n</span></p> 

Note: The DB instance is ora10g, its installation directory location/u01/app/oracle/product/10.2.0, the account opening automatically starts


2. Add the Dbstart command to Rc.local as follows:

<span style= "FONT-SIZE:14PX;" >[[email protected] bdump]$ cat/etc/rc.local #!/bin/sh## This script would be executed *after* all the other init scrip ts.# you can put your own initialization stuff on here if you don ' t# want to do the full Sys V style init Stuff.touch/var /lock/subsys/localsu-oracle-c "dbstart/u01/app/oracle/product/10.2.0"       <<<<<<<<< <<<<<<<<<<<< full path According to your actual situation to decide </span>


At this point, the auto-start environment is ready to complete. You can do the test or restart verification by Dbstart +{database installation directory full path} ...

----------------------------------------

Daoxing is still shallow, welcome to shoot bricks.

Reprint please indicate the source.  

Oracle stand-alone environment for booting the database automatically

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.