亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
樓主: noise
打印 上一主題 下一主題

如何使Oracle10g在HPUX11下開機自動啟動關(guān)機自動關(guān)閉?! [復制鏈接]

論壇徽章:
0
11 [報告]
發(fā)表于 2006-09-15 09:43 |只看該作者
原帖由 doni 于 2006-9-15 08:39 發(fā)表
HP-UX沒用過,就SOLARIS下的情況而言,有這樣幾點
首先,應該注意你的.profile,而不是.dtprofile
其次,自動啟動和關(guān)閉的腳本可以寫成這樣
su - oracle -c "dbstart; lsnrctl start"
還有就是,啟動腳本 ...


oracle的.dtprofile文件內(nèi)容:

# ##########################################################################
# #
# #  .dtprofile
# #
# #  user personal environment variables
# #
# #  Common Desktop Environment (CDE)
# #
# #  (c) Copyright 1996 Digital Equipment Corporation.
# #  (c) Copyright 1993,1994,1996 Hewlett-Packard Company.
# #  (c) Copyright 1993,1994,1996 International Business Machines Corp.
# #  (c) Copyright 1993,1994,1996 Sun Microsystems, Inc.
# #  (c) Copyright 1993,1994,1996 Novell, Inc.
# #  (c) Copyright 1996 FUJITSU LIMITED.
# #  (c) Copyright 1996 Hitachi.
# #
# #
# #  $XConsortium: dtprofile.src /main/4 1996/04/21 19:31:50 drk $
# #
# ##########################################################################


# ##########################################################################
# #
# #  Your $HOME/.dtprofile is read each time you login to the Common Desktop
# #  Environment (CDE) and is the place to set or override desktop
# #  environment variables for your session. Environment variables set in
# #  $HOME/.dtprofile are made available to all applications on the desktop.
# #  The desktop will accept either sh or ksh syntax for the commands in
# #  $HOME/.dtprofile.
# #
# ##########################################################################


# ##########################################################################
# #
# #  Random stdout and stderr output from apps started by Session Mgr or
# #  by actions via front panel or workspace menu can be directed into
# #  the user's $HOME/.dt/sessionlogs directory.  By default this output
# #  is not recorded.  Instead it is sent off to /dev/null (Unix's "nothing"
# #  device).
# #
# #  If this random application output is wanted (usually only wanted for
# #  debugging purposes), commenting out following "dtstart_sessionlogfile"
# #  lines will send output to your $HOME/.dt/sessionlogs directory.
# #
# #  Alternatively, can change "/dev/null" to "/dev/console" to see this
# #  debugging output on your console device.  Can start a console via the
# #  Workspace programs menu or via Application Mgr's Desktop Tools
# #  "Terminal Console" icon.
# #
# ##########################################################################

echo "This session log file is currently disabled."  >  $dtstart_sessionlogfile
echo "To enable logging, edit $HOME/.dtprofile and"  >> $dtstart_sessionlogfile
echo "remove dtstart_sessionlogfile=/dev/null line." >> $dtstart_sessionlogfile

export dtstart_sessionlogfile="/dev/null"


# ##########################################################################
# #
# #  By default, the desktop does not read your standard $HOME/.profile
# #  or $HOME/.login files. This can be changed by uncommenting the
# #  DTSOURCEPROFILE variable assignment at the end of this file. The
# #  desktop reads .profile if your $SHELL is "sh" or "ksh", or .login
# #  if your $SHELL is "csh".
# #
# #  The desktop reads the .dtprofile and .profile/.login without an
# #  associated terminal emulator such as xterm or dtterm. This means
# #  there is no available command line for interaction with the user.
# #  This being the case, these scripts must avoid using commands that
# #  depend on having an associated terminal emulator or that interact
# #  with the user. Any messages printed in these scripts will not be
# #  seen when you log in and any prompts such as by the 'read' command
# #  will return an empty string to the script. Commands that set a
# #  terminal state, such as "tset" or "stty" should be avoided.
# #
# #  With minor editing, it is possible to adapt your .profile or .login
# #  for use both with and without the desktop.  Group the statements not
# #  appropriate for your desktop session into one section and enclose them
# #  with an "if" statement that checks for the setting of the "DT"
# #  environment variable. When the desktop reads your .profile or .login
# #  file, it will set "DT" to a non-empty value for which your .profile or
# #  .login can test.
# #
# #  example for sh/ksh
# #
# #    if [ ! "$DT" ]; then
# #      #
# #      # commands and environment variables not appropriate for desktop
# #      #
# #      stty ...
# #   tset ...
# #   DISPLAY=mydisplay:0
# #   ...
# #    fi
# #
# #    #
# #    # environment variables common to both desktop and non-desktop
# #    #
# #    PATH=$HOME/bin:$PATH
# #    MYVAR=value
# #    export MYVAR
# #    ...
# #
# #  example for csh
# #
# #    if ( ! ${?DT} ) then
# #      #
# #      # commands and environment variables not appropriate for desktop
# #      #
# #      stty ...
# #      tset ...
# #      setenv DISPLAY mydisplay:0
# #      ...
# #    endif
# #
# #    #
# #    # environment variables common to both desktop and non-desktop
# #    #
# #    setenv PATH $HOME/bin:$PATH
# #    setenv MYVAR value
# #    ...
# #
# #  Errors in .dtprofile or .profile (.login) may prevent a successful
# #  login. If after you login, your session startup terminates and you
# #  are presented with the login screen, this might be the cause. If this
# #  happens, select the Options->Sessions->Failsafe Session item on the
# #  login screen, login and correct the error. The $HOME/.dt/startlog and
# #  $HOME/.dt/errorlog files may be helpful in identifying errors.
# #
# ##########################################################################

#
#  If $HOME/.profile (.login) has been edited as described above, uncomment
#  the following line.
#
# DTSOURCEPROFILE=true
PATH-$PATH: /user/sbin
TEMP=/tmp
TMPDIR=/tmp
export TEMP TMPDIR
ORACLE_BASSE=/opt/oracle
ORACLE_HOME=/opt/oracle
ORACLE_SID=orcl
ORACLE_TERM=xterm
export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_TERM
NLS_LANG=american_america.ZHS16GB231280
export NLS_LANG
ORA_LNS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORA_LNS33
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib:/usr/lib:$ORACLE_HOME/RDBMS/lib:$ORACLE_HOME/lib32
SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
export SHLIB_PATH LD_LIBRARY_PATH
PATH=/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/bin:$ORACLE_HOME/bin:/usr/contrib/bin:/$PATH
export PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPAHT:$ORACLE_HOME/network/jlib
export CLASSPATH
EDITOR=vi
export EDITOR
unset TNS_ADMIN
umask 022


紅色部分是在安裝oracle的時候添加的部分。


root的.profile文件內(nèi)容:

# @(#)B11.23_LR     

# Default (example of) super-user's .profile file


# Do not put "." in PATH; it is a potential security breach.
# Do not put "/usr/local/bin" in PATH; it is a potential security breach.
# Example assumes /home/root exists.
        set +u

        PATH=/usr/sbin:$PATH:/sbin:/home/root:/opt/oracle/bin

# Be sure that VUE does not invoke tty commands

   if [ ! "$VUE" ]; then

   # Set up the terminal:
        if [ "$TERM" = "" ]
        then
                eval ` tset -s -Q -m ':?hp' `
        else
                eval ` tset -s -Q `
        fi
        stty erase "^H" kill "^U" intr "^C" eof "^D"
        stty hupcl ixon ixoff
        tabs

        echo
        echo "Value of TERM has been set to \"$TERM\". "
        export TERM

        EDITOR=vi
        export EDITOR

   fi               # if !VUE


# Set up shell environment:

        set -u                                        # error if undefined variable.
        trap "echo 'logout root'" 0                  # what to do on exit.


# Set up shell variables:

        MAIL=/var/mail/root
        # don't export, so only login shell checks.

        echo "WARNING:  YOU ARE SUPERUSER !!\n"
       
# Set up Oracle

        NLS_LANG=american_america.ZHS16GB231280
        export NLS_LANG
        ORA_LNS33=$ORACLE_HOME/ocommon/nls/admin/data
        export ORA_LNS33
        LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib:/usr/lib:$ORACLE_HOME/RDBMS/lib:$ORACLE_HOME/lib32
        SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
        export SHLIB_PATH LD_LIBRARY_PATH
        PATH=/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/bin:$ORACLE_HOME/bin:/usr/contrib/bin:/$PATH
        export PATH


最后的紅色部分是我后加的。


另外,我使用的腳本是oracle自帶的啟動和關(guān)閉腳本,啟動啟動腳本已經(jīng)包括了監(jiān)聽啟動部分。

[ 本帖最后由 noise 于 2006-9-15 11:16 編輯 ]

論壇徽章:
0
12 [報告]
發(fā)表于 2006-09-15 10:00 |只看該作者
你使用了oracle提供的dbstart腳本,  這個腳本會去檢測/etc/oratab, 并根據(jù)oratab的內(nèi)容啟動相應的oracle數(shù)據(jù)庫實例, 如果以oracle用戶登錄后運行dbstart, 則不會運行你添加的環(huán)境變量的內(nèi)容, 因為此時$PATH環(huán)境變量不為空。

關(guān)于監(jiān)聽的問題, 建議用如下腳本啟動
ORACLE_HOME=
export ORACLE_HOME
$ORACLE_HOME/bin/lsnrctl start

運行dbstart和dbstop,你的數(shù)據(jù)庫能夠正常啟動關(guān)閉么?

論壇徽章:
0
13 [報告]
發(fā)表于 2006-09-15 10:10 |只看該作者
手工運行su - oracle -c "dbstart"和su - oracle -c "dbshut"可以實現(xiàn)數(shù)據(jù)庫的啟動和關(guān)閉,只是監(jiān)聽不能正常啟動,還報錯。

論壇徽章:
0
14 [報告]
發(fā)表于 2006-09-15 10:28 |只看該作者
查一下監(jiān)聽的配置文件

論壇徽章:
0
15 [報告]
發(fā)表于 2006-09-15 10:29 |只看該作者
換一下啟動監(jiān)聽的部分, 看看監(jiān)聽能否正常啟動。

論壇徽章:
0
16 [報告]
發(fā)表于 2006-09-15 10:31 |只看該作者
你說su - oracle不可以做一些事情, 直接用oracle登錄可以做一些事情
可不可以給出su - oracle后的環(huán)境變量和直接用oracle登錄后的環(huán)境變量

論壇徽章:
0
17 [報告]
發(fā)表于 2006-09-15 10:34 |只看該作者
監(jiān)聽無法啟動的原因找到了,是在oracle下少了個.profile。

論壇徽章:
0
18 [報告]
發(fā)表于 2006-09-15 11:52 |只看該作者
我現(xiàn)在試過,把腳本放在/sbin/rc2.d、/sbin/rc3.d、/sbin/rc4.d和/etc/rc.config.d中,只有在/etc/rc.config.d中可以在啟動時執(zhí)行腳本,但這樣會導致系統(tǒng)啟動變得非常慢,這是什么原因?腳本還可以放在什么位置?而且不影響系統(tǒng)的正常啟動速度?

論壇徽章:
0
19 [報告]
發(fā)表于 2006-09-15 12:48 |只看該作者

論壇徽章:
0
20 [報告]
發(fā)表于 2006-09-15 12:54 |只看該作者
HP-UX的默認運行級別是3, 啟動過程中將運行/sbin/rc3.d下的所有腳本,不過不是以start作為參數(shù)來運行這個腳本(和linux不太一樣), 如果init 2然后再init 3則會以start參數(shù)來運行所有腳本
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP