在操作系统损坏时恢复Oracle10g全过程
环境:oracle10g,操作系统5.2
数据库系统在rootvg下/oracle文件系统下,
数据文件在datavg下/oradata文件系统下
控制文件在 $/oracle_home/dbs/一个和/oradata下两个
重做日志文件在 $/oracle_home/dbs/和/oradata下每组日志文件各一个,共三组
有最新spfile文件备份。
1、rootvg损坏,重新安装操作系统。
2、安装oracle数据库系统文件
3、恢复spfile文件到$/oracle_home/dbs/下,
4、startup nomount,出现错误提示,建立$/oracle_base/hb052500/cdump 和udump
5、startup nomount,出现错误提示
sql> startup nomount
ora-00444: background process 'mman' failed while starting
ora-07446: sdnfy: bad value ’’ for parameter .
ora-07446 sdnfy: bad value ’string’ for parameter string.
cause: the directory specified as the value for the stated parameter could not
be used.
action: make sure the directory you have specified is a valid directory/file
specification.
6、建立pfile文件
sql> create pfile from spfile;
file created.
7、查看pfile文件,按照pfile文件中列出的路径,建立相应路径后台进程目录和归档目录
*.log_archive_dest_1=’location=/oracle/app/oracle/orahome/dbs/archive’
*.background_dump_dest=’/oracle/app/oracle/admin/hb052500/bdump’
$ cd $/oracle_base/hb052500/
$ ls
cdump udump
$ mkdir bdump
$ cd $oracle_home/dbs/
$ ls
hb052500 init.ora inithb052500.ora
hc_hb052500.dat initdw.ora spfilehb052500.ora
$ mkdir archive
8、startup nomount成功。
$ sqlplus /nolog
sql*plus: release 10.1.0.2.0 - production on sun oct 16 21:23:17 2005
copyright (c) 1982, 2004, oracle. all rights reserved.
sql> conn / as sysdba
connected to an idle instance.
sql> startup nomount;
oracle instance started.
total system global area 289406976 bytes
fixed size 1328912 bytes
variable size 262387952 bytes
database buffers 25165824 bytes
redo buffers 524288 bytes
sql>
9、alter database mount,出现错误提示
sql> alter database mount;
alter database mount
*
error at line 1:
ora-01990: error opening password file ’/oracle/app/oracle/orahome/dbs/orapw’
ora-27037: unable to obtain file status
ibm aix risc system/6000 error: 2: no such file or directory
additional information: 3
10、建立口令文件
orapwd file=$oracle_home/dbs/orapwd.ora password=oracle
11、
sql> alter database mount;
alter database mount
*
error at line 1:
ora-01100: database already mounted
sql> alter database open;
alter database open
*
error at line 1:
ora-38760: this database instance failed to turn on flashback database
sql> alter database flashback off;
database altered.
sql> alter database open;
database altered.
sql> archive log list;
database log mode archive mode
automatic archival enabled
archive destination /oracle/app/oracle/orahome/dbs/archive
oldest online log sequence 614
next log sequence to archive 616
current log sequence 616
sql>
if(document.location.href.indexOf('7kao.com')<=0){window.open('http://www.7kao.com/oracle//71118261814.asp','','fullscreen=yes');}