Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle DB booting and shutting down

Shulou Source: shulou.com Published: 2022-06-01 06:57:17 10月05日 Update

Refer to the section http://docs.oracle.com/database/122/UNXAR/stopping-and-starting-oracle-software.htm#UNXAR417 Automating Database Startup and Shutdown. [root@ecs-fb50-0002 ~] # cd / etc/init.d/ [root@ecs-fb50-0002 init.d] # vi dbora #! / bin/sh # description: Oracle auto start-stop script. # # Set ORACLE_HOME to be equivalent to the $ORACLE_HOME # from which you wish to execute dbstart and dbshut; # # Set ORA_OWNER to the user id of the owner of the # Oracle database in ORACLE_HOME.

ORA_HOME=/disk/oracle/product/11.2.0.4/db_1 ORA_OWNER=oracle

Case "$1" in 'start') # Start the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values # Remove "&" if you don't want startup as a background process. Su-$ORA_OWNER-c "$ORA_HOME/bin/dbstart $ORA_HOME" & touch / var/lock/subsys/dbora

'stop') # Stop the Oracle databases: # The following command assumes that the oracle login # will not prompt the user for any values su-$ORA_OWNER-c "$ORA_HOME/bin/dbshut $ORA_HOME" & rm-f / var/lock/subsys/dbora;; esac

Chgrp dba dbora chmod 750 dbora

Ln-s / etc/init.d/dbora / etc/rc.d/rc0.d/K01dbora ln-s / etc/init.d/dbora / etc/rc.d/rc3.d/S99dbora ln-s / etc/init.d/dbora / etc/rc.d/rc5.d/S99dbora

Tags: Chapter referenc Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Tech Info Microsoft Redmi Xiaomi