Manual and automatic Oracle Database startup

Source: Internet
Author: User

1. Manual start method:

$ ORACLE_HOME/bin/LSNRCTL start

The listener continues to run after it is started.

Sqlplus/nolog

SQL> Conn/As sysdba

SQL> startup

The database has been started...

2. automatically start the database

Automatic Start is nothing more than a script. You can write a script yourself to run the script, or enable him to automatically execute the script at startup. The method is flexible, but the key is to modify the content of the two files.

1)/etc/oratab

Change orcl:/home/vkz (username)/Oracle/oracle11g/product/11.2.0/dbhome_1: n to: Y.

Different installation directories may have different paths before/product, which will be automatically generated after installation. Just change n to y.


2)/$ ORACLE_HOME/bin/dbstart

After opening it with vim, We can find oracle_home_listner. Here I write = $1, so it is impossible to run the script directly by running dbstart. Here we can change it to = $ ORACLE_HOME.

You can also set a parameter $ ORACLE_HOME when running dbstart.


The rest is to write an unlocking script in the/etc/init. d directory... very simple :)


Note:

Oracle provides three files for configuring Automatic startup of the Oracle Database Service:


/Etc/oratab
$ ORACLE_HOME/bin/dbstart
$ ORACLE_HOME/bin/dbshut


The three files are described as follows:
/Etc/oratab
---- Specify the database to be automatically started and closed in this file.
$ ORACLE_HOME/bin/dbstart
---- Read the content in the oratab file, start the corresponding database, and start the network listenerProgram.
$ ORACLE_HOME/bin/dbshut
---- Read the content in the oratab file, close the corresponding database, and disable the network listener.

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.