|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
无论图形界面发展到什么水平这个原理是不会变的,Linux命令有许多强大的功能:从简单的磁盘操作、文件存取、到进行复杂的多媒体图象和流媒体文件的制作。
1、修正Oracle体系设置文件/etc/oratab
/etc/oratab格局为:SID:ORACLE_HOME:AUTO
把AUTO域设置为Y(年夜写),只要如许,oracle自带的dbstart和dbshut才干够发扬感化。我的为:
ora9i:/home/oracle/ora/products/9.2.0:Y
2、编写服务剧本:
以下:
#!/bin/bash
#
#################FUNCTION#############
#
#AutoStartOracleandlistener
#AutoStopOracleandlistener
#
#####################################
#
#CreatedbyZhouYS2003-11-26
#
case"{GetProperty(Content)}"in
start)
echo"StartingOracleDatabases..."
echo"-------------------------------------------------">>/var/log/oracle
date+"%T%a%D:StartingOracleDatabaseeaspartofsystemup.">>/var/log/oracle
echo"-------------------------------------------------">>/var/log/oracle
su-oracle-c"dbstart">>/var/log/oracle
echo"Done."
echo"StartingOracleListeners..."
echo"-------------------------------------------------">>/var/log/oracle
date+"%T%a%D:StartingOracleListenersaspartofsystemup.">>/var/log/oracle
echo"-------------------------------------------------">>/var/log/oracle
su-oracle-c"lsnrctlstart">>/var/log/oracle
echo"Done."
echo""
echo"-------------------------------------------------">>/var/log/oracle
date+"%T%a%D:Finished.">>/var/log/oracle
echo"-------------------------------------------------">>/var/log/oracle
touch/var/lock/subsys/oracle
;;
stop)
echo"StopingOracleListeners..."
echo"-------------------------------------------------">>/var/log/oracle
date+"%T%a%D:StopingOracleListeneraspartofsystemdown.">>/var/log/oracle
echo"-------------------------------------------------">>/var/log/oracle
su-oracle-c"lsnrctlstop">>/var/log/oracle
echo"Done."
rm-f/var/lock/subsys/oracle
echo"StopingOracleDatabases..."
echo"-------------------------------------------------">>/var/log/oracle
date+"%T%a%D:StopingOracleDatabasesaspartofsystemdown.">>/var/log/oracle
echo"-------------------------------------------------">>/var/log/oracle
su-oracle-c"dbshut">>/var/log/oracle
echo"Done."
echo""
echo"-------------------------------------------------">>/var/log/oracle
date+"%T%a%D:Finished.">>/var/log/oracle
echo"-------------------------------------------------">>/var/log/oracle
;;
restart)
{GetProperty(Content)}stop
{GetProperty(Content)}start
;;
*)
echo"Usage:oracle{start|stop|restart}"
exit1
esac
</p>
vim除非你打算真正的学好linux,或者说打算长久时间学习他,而且肯花大量时间vim,否则,最好别碰 |
|