[oracle@hvrhub hub]$ cat /etc/oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are 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", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
hub:/u01/app/oracle/product/11.2.0/dbhome_1:Y
[oracle@hvrhub hub]$ cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
su - oracle -c 'dbstart'
su - oracle -c 'lsnrctl start'
[oracle@hvrhub hub]$

本文介绍了Oracle数据库在Linux系统上的启动配置方法。通过/etc/oratab文件指定数据库实例的SID、Oracle Home路径及是否在系统启动时自动启动。同时,通过/etc/rc.local脚本使用su命令切换到oracle用户并启动数据库实例和服务。

被折叠的 条评论
为什么被折叠?



