Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

DB AUTOMATIC STARTUP - SHUTDOWN in Oracle Linux



DATABAES NAME : nijam
[oracle@nijam ~]$ ps -ef |grep pmon
oracle 3630 1 0 16:42 ? 00:00:00 ora_pmon_nijam
oracle 4297 4190 0 16:44 pts/1 00:00:00 grep pmon
[root@nijam ~]# vi /etc/oratab
nijam:/u01/app/oracle/product/10.2.0/db_1:Y
[oracle@nijam bin]$ dbshut
[oracle@nijam ~]$pwd
[oracle@nijam ~]$ cd /u01/app/oracle/product/10.2.0/db_1/bin/
[oracle@nijam ~]$ ps -ef |grep pmon
oracle 4297 4190 0 16:44 pts/1 00:00:00 grep pmon
[oracle@nijam bin]$ dbstart
[oracle@nijam ~]$ ps -ef |grep pmon
oracle 3630 1 0 16:42 ? 00:00:00 ora_pmon_nijam
oracle 4297 4190 0 16:44 pts/1 00:00:00 grep pmon

[root@nijam ~]# cd /etc/init.d/

[root@nijam init.d]# vi dbora

#!/bin/sh -x
#
# file: /etc/init.d/dbora
# chkconfig: 2345 80 30
# description:  nijam
#
#

# the user that oracle runs as (default: oracle)
ORACLE=oracle

# database instance id
ORACLE_SID=nijam

# ORACLE_HOME (file system) path
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

PATH=${PATH}:$ORACLE_HOME/bin

export ORACLE_SID ORACLE_HOME PATH

case $1 in
  'start')
    su - $ORACLE -c $ORACLE_HOME/bin/dbstart
  ;;
  'stop')
    su - $ORACLE -c $ORACLE_HOME/bin/dbshut
  ;;
  *)
    echo "usage: $0 {start|stop}"
  ;;
esac

exit

[root@nijam etc]# chmod +x dbora


 There are 7 run levels in Linux environment.
Run-level          Name                    Description

0                     Halt                   Shuts down the system.
1                 Single-User Mode     Mode for administrative tasks.
2                 Multi-User Mode      No network interfaces and services
3                 Multi-User Mode      Networking  Starts the system normally.
4                  Not used               For special purposes.
5                 With Display           As runlevel 3 + Gui
6                   Reboot                 Reboots the system.

Chkconfig command will create start and kill scripts in /etc/rc[runlevel].d folders.
[root@nijam etc]# ls rc*

Comments

Popular posts from this blog

PostgreSQL pgBadger

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

ORA-01261: Parameter db_recovery_file_dest destination string cannot be translated ORA-01262: Stat failed on a file destination directory Linux-x86_64 Error: 2: No such file or directory

PostgreSQL Pgbadger Installation On Linux

PostgreSQL Database startup / shutdown /restart