1、shutdown normal
正常方式关闭数据库?nbsp;
2、shutdown immediate
立即方式关闭数据库?nbsp;
在SVRMGRL中执行shutdown immediateQ数据库q不立即关闭Q?nbsp;
而是在Oracle执行某些清除工作后才关闭Q终止会(x)话、释放会(x)话资源)Q?nbsp;
当用shutdown不能关闭数据库时Qshutdown immediate可以完成数据库关闭的操作?
3、shutdown abort 若检查点信息一_(d)则做崩溃恢复 q些问题都好处理Q最怕的问题是这个时候系l有大量IOQ结果这样造成写的H然中断Q碰巧造成文g块的逻辑坏块Q那ȝ比较大一些,其是系l表I间的block损坏 在Oracle8i里,当数据库失去响应以后Q你在操作系l上杀掉用戯E后Q一般数据库可以恢复正怺 然后不行再重新shutdown abort 其实起不来也是因为os的缘故,在文件正在写的时候出现问题导致文件不一致或者损?#8230;…
直接关闭数据库,正在讉K数据库的?x)话会(x)被H然l止Q?nbsp;
如果数据库中有大量操作正在执行,q时执行shutdown abort后,重新启动数据库需要很长时?
--------------------------------------------------------
shutdown abort 的时候,?/strong>kill q程是一L(fng)效果
数据库立卛_闭,q个时候文件状态可能不一?
因ؓ(f)正常关闭数据库会(x)同步校验各文Ӟ使得重新启动的时候文件时间点一致ƈ且不用进行崩溃恢?/p>
若检查点信息不一_(d)正好在更新文件头Q则需要做介质恢复
虽然shutdown abort 出错的几率很,1000个h可能只有一个h到Q但是我们还是要心?
正确的处理流E是Qshutdown immediate ,若数据库q迟不能down下来Q在os上观察IO状况Q几乎没有io的时候,另开一H口shutdown abort Q几乎不?x)出问题?br />--------------------------------------------------------
http://www.itpub.net/showthread.php?threadid=180315&pagenumber=
先用IMMEDIATE来DOWNQ实在不行了Q看一下数据库文g上没IO了,再用ABORT
------------------------------------------------------------------------------
你可以尝试先在系l杀掉非后台Oracleq程Q在q接shutdown immediate安全多?/p>
-------------------------------------------------------------------------------
?shutdown immediate 应该是首?/p>
]]>
q样的错误?br />
SQL> startup
ORACLE instance started.
Total System Global Area 538514184 bytes
Fixed Size 451336 bytes
Variable Size 503316480 bytes
Database Buffers 33554432 bytes
Redo Buffers 1191936 bytes
Database mounted.
ORA-01113: file 26 needs media recovery
ORA-01110: data file 26: '/opt/ora9/product/oradata/NTDB/EXAMPLE02.dbf'
解决Ҏ(gu)Q?br />
SQL> recover datafile '/opt/ora9/product/oradata/NTDB/EXAMPLE02.dbf'
ORA-00279: change 244674111 generated at 09/24/2013 15:20:41 needed for thread
1
ORA-00289: suggestion : /opt/ora9/product/oracle/dbs/arch1_1123.dbf
ORA-00280: change 244674111 for thread 1 is in sequence #1123
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
Log applied.
Media recovery complete.
SQL> alter database open;
Database altered.
Connected to: Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set
About to export the entire database ...
. exporting tablespace definitions
EXP-00008: ORACLE error 1187 encountered
ORA-01187: cannot read from file 201 because it failed verification tests
ORA-01110: data file 201: '/opt/ora9/product/oradata/NTDB/temp1.dbf'
EXP-00000: Export terminated unsuccessfully
从上面的错误信息可以看出是temp临时表空间的数据文g有问题,解决办法Q?br />1、删除(f)时表I间Q?nbsp;alter database tempfile '/opt/ora9/product/oradata/NTDB/temp1.dbf' drop;
2、重建数据文Ӟ(x)
alter tablespace temp add tempfile '/opt/ora9/product/oradata/NTDB/temp01.dbf' size 512M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE UNLIMITED;
通过上述两个步骤可以解军_q行数据库备份时出现的ORACLE error 1187 encountered错误?/p>
[oracle@readhatAS53 etc]$ cat /etc/oratab
#
# 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.
#
#
ORCL:/u01/oracle/product/ora10g:Y
?ORACLE_SID:$ORACLE_HOME:<N|Y> 讄为YӞ允许实例自启动,当设|ؓ(f)NӞ则不允许自启动?q个文g里的配置仅仅起一个开关的作用Q其q不?x)具体的执行启动和关闭,具体的操作?ORACLE_HOME/bin/dbstart和dbshut 脚本来实现?q?个脚本在执行时会(x)?etc/oratab 文g里的配置Qؓ(f)Y时才能l执行。因此只要将ORCL:/u01/oracle/product/ora10g:N修改为Yp了?br />2、用root用户?font face="Verdana">/etc/rc.d/rc.localq个文g中添加如下内容:(x)
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
su - oracle -c'lsnrctl start'//启动oracle数据库监?br />su - oracle -c'/u01/oracle/product/ora10g/bin/dbstart start'//启动oracle数据库实?br />su - oracle -c'/opt/tomcat/apache-tomcat-6.0.20/bin/startup.sh'//启动tomcat服务器的配置?br />
3、rebootpȝQoracle数据库与tomcat服务器就可以自动启动了?br />