Create auto-start service for Oracle in Linux

Source: Internet
Author: User

Today, Oracle is automatically started and added to my machine. The process is as follows:
1. Use the root user to modify the/etc/oratab file:
$ Vi/etc/oratab

Orcl:/oracle/app/product/10.2.0/db_1: N

Changed:

Orcl:/oracle/app/product/10.2.0/db_1: Y

That is, change the last N to Y.

2. Use the Oracle user to modify the $ ORACLE_HOME/bin/dbstart file:

# Su-oracle

$ Cd $ ORACLE_HOME/bin

$ Vi dbstart

Locate ORACLE_HOME_LISTNER =... and change it

ORACLE_HOME_LISTNER =/u01/app/oracle/product/10.1.0/db_1

Or directly modify it:

ORACLE_HOME_LISTNER = $ ORACLE_HOME

Iii. Test and run dbshut. Check whether dbstart can start the Oracle service and listener service:

1. modify the permissions of dbstart and dbshut log files:

$ Su-root

# Cd $ ORACLE_HOME

# Chown oracle: oinstall startup. log

# Chown oracle: oinstall shutdown. log

Note: startup. log and shutdown. log may not exist. They are automatically created only after you run./dbstart and./dbshut.

2. Execute the corresponding script for testing

# Su-oracle

$ Cd $ ORACLE_HOME/bin

$./Dbstart (./dbshut)

$ Ps-efw | grep ora _

$ Lsnrctl status

$ Ps-efw | grep LISTEN | grep-v grep

4. Create a service

$ Su-root

# Cd/etc/rc. d/init. d/

# Vi oradbstart

Copy the following Script 1 or script 2 to the oradbstart file:

  • Three pages in total:
  • Previous Page
  • 1
  • 2
  • 3
  • Next Page

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.