DMK Oracle
release_2.2.0
release_2.2.0
  • Introduction
  • Release 2 note
  • āš™ļøInstallation and configuration
    • Installation & Upgrade & De-installation (Unix)
    • Installation & Upgrade & De-installation (Windows)
    • Functionalities & Features
    • Advanced Configuration
    • Variables and aliases
    • Migration to DMK
  • šŸ—„ļøStructure
    • Structure
    • Oracle Grid Infrastructure & DMK
    • Oracle Database Multitenant – DMK features
  • šŸ“ƒScripts
    • Status script
    • O.S Start/Stop script integration
      • O.S Start/Stop script integration until Red Hat/Oracle Linux 6
      • O.S Start/Stop script integration since Red Hat/Oracle Linux 7
    • dmk.sh / dmk-core.pl
    • service_start_stop.ksh
    • database.ksh
    • db_crs.ksh
    • listener.ksh
    • listener_vcs.ksh
    • fsdisc.ksh
    • emctlagent.ksh
    • emctlgrid.ksh
    • opmnctl.ksh
    • goldengate.ksh
    • dgobserver.ksh
    • version.ksh|version
    • housekeeping.{ksh|cmd }
    • odiagentctl.{ksh}
    • Libraries
      • DMK_ENV.pm
      • DMK_STATUS.pm
  • ā„¹ļøAppendix
  • 🧩Extension
    • dmk_dbbackup
      • Introduction
      • Release notes
      • Installation
      • Functionalities & Features
      • Structure
      • dmk_rman.{ksh|cmd}
      • dmk_dtpump.{ksh|cmd}
      • dmk_backup_report.{ksh|cmd}
      • Appendix
    • dmk_dbcreate
      • Introduction
      • Release notes
      • Installation & Upgrade & De-Installation
      • Functionalities & Features
      • Database creation
      • Structure
      • Bug fix :DMK-14-10 and Oracle 12c
      • Appendix
    • dmk_dbduplicate
      • Introduction
      • Release notes
      • Installation & Upgrade & De-Installation
      • Functionalities & Features
      • Database duplicates/clones
      • Structure
      • Scheduling
      • Example
      • Appendix
    • dmk_ha
      • Introduction
      • Release notes
      • Installation & Upgrade & De-Installation
      • Functionalities & Features
      • Structure
      • Scripts
      • Data Guard : archivelog management strategy (Oracle 10g/11g)
      • Data Guard monitoring
      • DMK_HA virtual IP solution for Unix/Linux
      • DMK_HA virtual IP solution for Microsoft Windows
      • Oracle GoldenGate with Oracle Active Data Guard
      • Appendix
    • dmk_sql
      • Introduction
      • Installation & Upgrade & De-installation
      • Functionalities & Features
      • Structure
      • References
      • Scripts
      • Generate Report
      • Search
  • šŸ“„OFA
    • Introduction
    • OFA Naming guidelines
    • OFA directory structure
Powered by GitBook
On this page
  1. Scripts
  2. O.S Start/Stop script integration

O.S Start/Stop script integration until Red Hat/Oracle Linux 6

DMK provides a tiny script which integrated to the boot procedure serves to start & stop all the oracle services smoothly, source code:

cat ${DMK_HOME}/templates/init.d/oracle.linux
#!/bin/bash
...
case "$1" in
'start')
su - oracle -c "$
{DMK_HOME:-/u01/app/oracle/local/dmk}/bin/service_start_stop.ksh start"
touch /var/lock/subsys/oracle
;;
'stop')
su - oracle -c "$
{DMK_HOME:-/u01/app/oracle/local/dmk}/bin/service_start_stop.ksh stop"
rm -f /var/lock/subsys/oracle
;;
*)
echo "usage $0 {start|stop}"
exit 1
;;
esac

Below, all steps for the implementation & integration into the boot sequence:

  • Firstly, copy the script to the ā€œ/etc/init.dā€ and set the correct privileges as the user root.

cp $DMK_HOME/templates/init.d/oracle.linux /etc/init.d/oracle
chmod 755 /etc/init.d/oracle
  • Secondly, integrate the new script to the boot sequence (again as root)

[root@svr01 ~]# /sbin/chkconfig --add oracle

All necessary metadata for the Run-Levels are available within the script.

  • Verify the integration

[root@svr01 ~]# /sbin/chkconfig --list oracle
oracle 0:off 1:off 2:off **3:on** 4:off **5:on** 6:off
  • Finally run the script

[root@svr01 ~]# /etc/init.d/oracle start
PreviousO.S Start/Stop script integrationNextO.S Start/Stop script integration since Red Hat/Oracle Linux 7

Last updated 5 months ago

šŸ“ƒ