192.168.81.1 hxqm
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=cadb #cadb是实例名,这个你可以根据自己的需求填写
ORACLE_TERM=xterm export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
DISPLAY=192.168.81.1:0; export DISPLAY
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
if [ ! $ORACLE_HOME_LISTNER ] ; then
echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
然后执行dbstart启动数据库
自启动:
添加自启动:
vi etc/rc.d/rc.local
添加:
su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'
设置数据库自动关闭脚本
#vi /etc/rc.d/init.d/dbshutdown
写入内容:
su - oracle -c 'lsnrctl stop'
su - oracle -c 'dbshut'
设置数据库自动关闭服务
#ln -s /etc/rc.d/init.d/dbshutdown /etc/rc.d/rc3.d/K04dbshutdown
重新启动EM服务
cd $ORACLE_HOME/bin/
./emctl stop dbconsole
./emctl start dbconsole
[oracle@koalca bin]$ ./emctl start dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
http://192.168.81.1:1158/em/console/aboutApplication
Agent Version : 10.1.0.4.1
OMS Version : Unknown
Protocol Version : 10.1.0.2.0
Agent Home : /app/oracle/product/10.2/db_1/koalca_cadb
Agent binaries : /app/oracle/product/10.2/db_1
Agent Process ID : 3240
Parent Process ID : 1753
Agent URL : http://192.168.81.1:3938/emd/main
Started at : 2009-12-06 00:06:58
Started by user : oracle
Last Reload : 2009-12-06 00:06:58
Last successful upload : (none)
Last attempted upload : (none)
Total Megabytes of XML files uploaded so far : 0.00
Number of XML files pending upload : 10
Size of XML files pending upload(MB) : 0.04
Available disk space on upload filesystem : 23.22%
Agent is already started. Will restart the agent
Stopping agent ... stopped.
Starting Oracle Enterprise Manager 10g Database Control ................... started.
------------------------------------------------------------------
Logs are generated in directory /app/oracle/product/10.2/db_1/koalca_cadb/sysman/log
---------------------------------------------------------------
版本:
SQL> select * from v$version;
BANNER----------------------------------------------------------------Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - ProdPL/SQL Release 10.2.0.1.0 - ProductionCORE 10.2.0.1.0 ProductionTNS for 32-bit Windows: Version 10.2.0.1.0 - ProductionNLSRTL Version 10.2.0.1.0 - Production
通过以下命令启动和停止isqlplus服务:
isqlplusctl start
isqlplusctl stop
然后打开浏览器,输入地址http://youserverip:5560/isqlplus就可以访问isqlplus了