• <ul id="mayc0"></ul>
    <ul id="mayc0"><center id="mayc0"></center></ul>
    <strike id="mayc0"><input id="mayc0"></input></strike>
    <ul id="mayc0"></ul>
  • 始創(chuàng)于2000年 股票代碼:831685
    咨詢熱線:0371-60135900 注冊(cè)有禮 登錄
    • 掛牌上市企業(yè)
    • 60秒人工響應(yīng)
    • 99.99%連通率
    • 7*24h人工
    • 故障100倍補(bǔ)償
    全部產(chǎn)品
    您的位置: 網(wǎng)站首頁(yè) > 幫助中心>文章內(nèi)容

    AIX下Oracle數(shù)據(jù)庫(kù)自動(dòng)重啟設(shè)置

    發(fā)布時(shí)間:  2012/8/21 17:03:29

    一個(gè)關(guān)于Oracle數(shù)據(jù)庫(kù)的有趣問(wèn)題:

    中遠(yuǎn)公司在沒(méi)加磁盤(pán)陣列前建了一個(gè)Oracle實(shí)例zycw,加磁盤(pán)陣列后新建了一個(gè)實(shí)例zync。

    為了節(jié)省系統(tǒng)資源本打算平時(shí)只啟實(shí)例yznc,需要時(shí)才啟動(dòng)zycw。可每次系統(tǒng)重啟后系統(tǒng)會(huì)自動(dòng)重啟實(shí)例zycw,rc.d下沒(méi)有找到任何自動(dòng)重啟數(shù)據(jù)庫(kù)的腳本,ORACL_HOME/network/admin下也沒(méi)有l(wèi)istener.ora文件(系統(tǒng)自啟動(dòng)時(shí)listener服務(wù)時(shí)是讀取何處的參數(shù)文件還未搞清楚)。
    -
     

    后來(lái)才找到系統(tǒng)通過(guò)在inittab文件中加入一行startdb:2345678:wait:/etc/rc.startdb調(diào)用/etc/rc.startdb啟動(dòng)Oracle的。下面詳細(xì)介紹一下Oracle的這種自啟動(dòng)方式:

    1、 編輯修改 /etc/oratab文件將要啟動(dòng)的實(shí)例后面的字符改成Y。 文本樣例:
    #
    # This file is used by Oracle utilities. It is created by root.sh
    # and updated by the Database Configuration Assistant when creating
    # a database.
    # 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.
    ##
    *:/home/Oracle:N
    # *:/u2/Oracle/product/9.2.0.2.0:N
    zycw:/u2/Oracle/product/9.2.0.2.0:N
    *:/u2/Oracle/product/9.2.0.2.0:N
    zync:/u2/Oracle/product/9.2.0.2.0:Y
    #
    2、 配置啟動(dòng)文件: 在/etc下建立文件rc.startdb,腳本如下:(這里是直接調(diào)用Oracle系統(tǒng)自帶的啟動(dòng)腳本,也可自己編寫(xiě)啟動(dòng)腳本)
    su - Oracle "-c /u2/oracle/product/9.2.0.2.0/bin/dbstart"
    3、 下面要把啟動(dòng)信息放到/etc/inittab中,加入一行 startdb:2345678:wait:/etc/rc.startdb ,文本樣例:
    : @(#)49 1.28.2.9 src/bos/etc/inittab/inittab, cmdoper, bos520 8/23/00 19:50:13
    : IBM_PROLOG_BEGIN_TAG
    : This is an automatically generated prolog.
    :
    : bos520 src/bos/etc/inittab/inittab 1.28.2.9
    :
    : Licensed Materials - Property of IBM
    :
    : (C) COPYRIGHT International Business Machines Corp. 1989,1993
    : All Rights Reserved
    :
    : US Government Users Restricted Rights - Use, duplication or
    : disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
    :
    : IBM_PROLOG_END_TAG
    :
    : COMPONENT_NAME: CMDOPER
    :
    : ORIGINS: 3, 27
    :
    : (C) COPYRIGHT International Business Machines Corp. 1989, 1993
    : All Rights Reserved
    : Licensed Materials - Property of IBM
    :
    : US Government Users Restricted Rights - Use, duplication or
    : disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
    :
    : Note - initdefault and sysinit should be the first and second entry.
    :
    init:2:initdefault:
    brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
    powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console # Power Failure Detection
    mkatmpvc:2:once:/usr/sbin/mkatmpvc >/dev/console 2>&1
    atmsvcd:2:once:/usr/sbin/atmsvcd >/dev/console 2>&1
    load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
    tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
    rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
    fbcheck:23456789:wait:/usr/sbin/fbcheck 2>&1 | alog -tboot > /dev/console # run /etc/firstboot
    srcmstr:23456789:respawn:/usr/sbin/srcmstr # System Resource Controller
    rctcpip:23456789:wait:/etc/rc.tcpip > /dev/console 2>&1 # Start TCP/IP daemons
    sniinst:2:wait:/var/adm/sni/sniprei > /dev/console 2>&1
    rcnfs:23456789:wait:/etc/rc.nfs > /dev/console 2>&1 # Start NFS Daemons
    cron:23456789:respawn:/usr/sbin/cron
    piobe:2:wait:/usr/lib/lpd/pio/etc/pioinit >/dev/null 2>&1 # pb cleanup
    qdaemon:23456789:wait:/usr/bin/startsrc -sqdaemon
    writesrv:23456789:wait:/usr/bin/startsrc -swritesrv
    uprintfd:23456789:respawn:/usr/sbin/uprintfd
    shdaemon:2:off:/usr/sbin/shdaemon >/dev/console 2>&1 # High availability daemon
    l2:2:wait:/etc/rc.d/rc 2
    l3:3:wait:/etc/rc.d/rc 3
    l4:4:wait:/etc/rc.d/rc 4
    l5:5:wait:/etc/rc.d/rc 5
    l6:6:wait:/etc/rc.d/rc 6
    l7:7:wait:/etc/rc.d/rc 7
    l8:8:wait:/etc/rc.d/rc 8
    l9:9:wait:/etc/rc.d/rc 9
    naudio::boot:/usr/sbin/naudio > /dev/null
    logsymp:2:once:/usr/lib/ras/logsymptom # for system dumps
    diagd:2:once:/usr/lpp/diagnostics/bin/diagd >/dev/console 2>&1
    ctrmc:2:once:/usr/bin/startsrc -s ctrmc > /dev/console 2>&1
    dt:2:wait:/etc/rc.dt
    cons:0123456789:respawn:/usr/sbin/getty /dev/console
    ha_star:h2:once:/etc/rc.ha_star >/dev/console 2>&1
    ntbl_reset:2:once:/usr/bin/ntbl_reset_datafiles
    rcml:2:once:/usr/sni/aix52/rc.ml > /dev/console 2>&1
    tty0:2:off:/usr/sbin/getty /dev/tty0
    tty1:2:off:/usr/sbin/getty /dev/tty1
    tty2:2:off:/usr/sbin/getty /dev/tty2
    startdb:2345678:wait:/etc/rc.startdb

    AIX下Oracle數(shù)據(jù)庫(kù)重啟設(shè)置的資料文檔:
    Automating Database Startup for AIX (Optional)

    Oracle Corporation recommends that you configure your system to automatically
    start Oracle databases when your system starts up, and to shut down Oracle
    databases when your system shuts down. Automatic database startup and
    shutdown protects against improper shutdown of the database.
    Automating Database Startup
    Perform the following tasks to set up the dbstart and dbshut scripts so that they
    are called at system startup. This process must be completed for every new
    database that you want to configure for automated startup:
    1. Edit the /etc/oratab file.
    Configuration Tasks to Perform as the root User
    Database entries in the oratab file appears in the following format:
    Oracle_SID:ORACLE_HOME:{Y|N}
    In the preceding command, Y or N specifies whether you want the dbstart
    and dbshut scripts to start up and shut down the database.
    For Oracle Real Application Clusters installation, this entry appears in the
    following format:
    DB_NAME:Oracle_HOME:{Y|N}
    In the preceding command, DB_NAME is the cluster database name. Y or N
    specifies whether you want the dbstart and dbshut scripts to start up and
    shut down the database.
    2. For each database that you want to start up, find the Oracle_SID entry
    identified by the sid in the first field. Change the last field for each to Y.
    3. Add the dbstart script to the /etc/inittab file:
    # mkitab "oradb:2:wait:/bin/su oradb -c|/$Oracle_HOMES/bin/dbstart"
    In the preceding command, oradb is the identifier of the Oracle user for
    which you want to start the database.


    本文出自:億恩科技【www.vbseamall.com】

    服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM]

  • 您可能在找
  • 億恩北京公司:
  • 經(jīng)營(yíng)性ICP/ISP證:京B2-20150015
  • 億恩鄭州公司:
  • 經(jīng)營(yíng)性ICP/ISP/IDC證:豫B1.B2-20060070
  • 億恩南昌公司:
  • 經(jīng)營(yíng)性ICP/ISP證:贛B2-20080012
  • 服務(wù)器/云主機(jī) 24小時(shí)售后服務(wù)電話:0371-60135900
  • 虛擬主機(jī)/智能建站 24小時(shí)售后服務(wù)電話:0371-60135900
  • 專注服務(wù)器托管17年
    掃掃關(guān)注-微信公眾號(hào)
    0371-60135900
    Copyright© 1999-2019 ENKJ All Rights Reserved 億恩科技 版權(quán)所有  地址:鄭州市高新區(qū)翠竹街1號(hào)總部企業(yè)基地億恩大廈  法律顧問(wèn):河南亞太人律師事務(wù)所郝建鋒、杜慧月律師   京公網(wǎng)安備41019702002023號(hào)
      0
     
     
     
     

    0371-60135900
    7*24小時(shí)客服服務(wù)熱線