{"id":1174,"date":"2013-03-12T14:41:30","date_gmt":"2013-03-12T05:41:30","guid":{"rendered":"http:\/\/www.whoocus.com\/blog\/?p=1174"},"modified":"2013-03-12T14:41:56","modified_gmt":"2013-03-12T05:41:56","slug":"oracle%e8%87%aa%e5%8b%95%e8%b5%b7%e5%8b%95%e3%82%b9%e3%82%af%e3%83%aa%e3%83%97%e3%83%88","status":"publish","type":"post","link":"https:\/\/www.blowfish.co.jp\/?p=1174","title":{"rendered":"Oracle\u81ea\u52d5\u8d77\u52d5\u30b9\u30af\u30ea\u30d7\u30c8"},"content":{"rendered":"<p>[bash]<br \/>\n#! \/bin\/bash<br \/>\n#<br \/>\n# oracle: Starting Oracle database 11g<br \/>\n#<br \/>\n# chkconfig: 345 95 94<br \/>\n# description: Oracle Database Server<br \/>\n# processname: ora_<\/p>\n<p>. \/etc\/rc.d\/init.d\/functions<\/p>\n<p>lockfile=\/var\/lock\/subsys\/dbora<br \/>\nORATAB=\/etc\/oratab<br \/>\nORACLE_HOME=\/u01\/app\/oracle\/product\/11.2.0\/dbhome_1\/<br \/>\n#ORACLE_HOME=`awk -F: &#8216;\/^[^#:]+:.+:[Y]$\/ { print $2; exit}&#8217; $ORATAB`<br \/>\nif [ x$ORACLE_HOME = &quot;x&quot; ]; then<br \/>\n    echo &quot;There is not Y entry in $ORATAB.&quot;<br \/>\n    exit 1<br \/>\nfi<br \/>\nORACLE=`ls -l $ORACLE_HOME\/bin\/dbstart | awk &#8216;{print $3}&#8217;`<\/p>\n<p>case &quot;$1&quot; in<br \/>\n&#8216;start&#8217;)<br \/>\n   if [ -f $lockfile ]; then<br \/>\n     echo $0 already started.<br \/>\n     exit 1<br \/>\n   fi<br \/>\n   echo -n $&quot;Starting Oracle Database:&quot;<br \/>\n   su &#8211; $ORACLE -c &quot;$ORACLE_HOME\/bin\/lsnrctl start&quot;<br \/>\n   su &#8211; $ORACLE -c &quot;$ORACLE_HOME\/bin\/dbstart $ORACLE_HOME&quot;<br \/>\n   su &#8211; $ORACLE -c &quot;$ORACLE_HOME\/bin\/emctl start dbconsole&quot;<br \/>\n   touch $lockfile<br \/>\n   ;;<br \/>\n&#8216;stop&#8217;)<br \/>\n   if [ ! -f $lockfile ]; then<br \/>\n     echo $0 already stopped.<br \/>\n     exit 1<br \/>\n   fi<br \/>\n   echo -n $&quot;Stopping Oracle Database:&quot;<br \/>\n   su &#8211; $ORACLE -c &quot;$ORACLE_HOME\/bin\/lsnrctl stop&quot;<br \/>\n   su &#8211; $ORACLE -c &quot;$ORACLE_HOME\/bin\/dbshut&quot;<br \/>\n   su &#8211; $ORACLE -c &quot;$ORACLE_HOME\/bin\/emctl stop dbconsole&quot;<br \/>\n   rm -f $lockfile<br \/>\n   ;;<br \/>\n&#8216;restart&#8217;)<br \/>\n   $0 stop<br \/>\n   $0 start<br \/>\n   ;;<br \/>\n&#8216;status&#8217;)<br \/>\n   if [ -f $lockfile ]; then<br \/>\n     echo $0 started.<br \/>\n   else<br \/>\n     echo $0 stopped.<br \/>\n   fi<br \/>\n   ;;<br \/>\n*)<br \/>\n   echo &quot;Usage: $0 [start|stop|status]&quot;<br \/>\n   exit 1<br \/>\nesac<\/p>\n<p>exit 0<br \/>\n[\/bash]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[bash] #! \/bin\/bash # # oracle: Starting Oracle database 11g # # chkconfig: 345 95 94 # description: Oracle Da [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"saved_in_kubio":false,"footnotes":""},"categories":[5,12,4],"tags":[],"class_list":["post-1174","post","type-post","status-publish","format-standard","hentry","category-centos","category-oracle","category-tech"],"_links":{"self":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/1174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1174"}],"version-history":[{"count":2,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/1174\/revisions"}],"predecessor-version":[{"id":1176,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/1174\/revisions\/1176"}],"wp:attachment":[{"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blowfish.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}