solaris下oracle自启动
Solaris上Oracle自动启动设置
===========================================================
作者: tianying(http://tianying.itpub.net)
发表于: 2005.04.03 21:51
分类: 初始分类
出处: http://tianying.itpub.net/post/2852/24823
---------------------------------------------------------------
刚在一台solaris上装了oracle9i,对于oracle在solaris上的自动启动设置很感兴趣,研究了一下。总结如下:
一、Solaris上开机自动启动
Solaris在开关机时,会自动运行/etc/rc.d目录下的所有脚本。其中N越大,执行的级别越高。其中,S开头的脚本在开机时自动运行,K开头的脚本在关机时自动运行。
二、Oracle上的启动脚本
脚本可手写,或使用Oracle自带的启动和关闭数据库的脚本。
Oracle自带脚本:$ORA_HOME/bin/dbstart、$ORA_HOME/bin/dbshut
注意:dbstart中的参数PFILE可能存在问题(Oracle默认不使用pfile启动),需手动修改。
三、设置Oracle自动启动步骤(使用Oracle自带脚本)
1、修改dbstart、dbshut脚本,保证直接运行时可启动关闭数据库
2、将调用dbstart、dbshut的脚本dbora放置在/etc/init.d目录下,dbora的内容如下:
#!/bin/sh
ORA_HOME=/export/home/oracle/app/oracle/products/9.2.0
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup:cannot start"
exit
fi
case "$1" in
'start' )
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
/etc/init.d/dblsnrctl.sh
;;
'stop' )
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
;;
esac
3、将启动lsnrctl的脚本dblsnrctl.sh(脚本dbora将调用此脚本)放置在/etc/init.d目录下,dblsnrctl.sh内容如下:
su - oracle
相关文档:
Introduction to Schema Objects
A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include the following types o ......
ORACLE常用命令
一、ORACLE的启动和关闭
1、在单机环境下
要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下
su - oracle
a、启动ORACLE系统
oracle>svrmgrl
SVRMGR>connect internal
SVRMGR>startup
SVRMGR>quit
b、关闭ORACLE系统
oracle>svrmgrl
SVRMGR>connect&nb ......
1.使用sqlldr
2.首先建立相应的表
create table test(ip1 number, ip2 number, locate varchar2(512),country varchar2(60),province varchar2(60),city varchar2(60))
3.写控制文件 city.ctl
load data
infile 'c:\city.txt'
append into table test
--when country='中国'
fields terminated by ','
(
ip1,
ip ......
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 ......
把数据从一个表复制到另一个表,插入新数据或替换掉老数据是每一个ORACLE DBA都会经常碰到的问题。在ORACLE9i以前的年代,我们要先查找是否存在老数据,如果有用UPDATE替换,否则用INSERT语句插入,其间少不了还有一些标记变量等等,繁琐的很。现在ORACLE9i专为这种情况提供了MERGE语句,使这一工作变得异常轻松,
MERGE语 ......