ITPub博客

首页 > 数据库 > Oracle > 没有备份情况下丢失参数文件

没有备份情况下丢失参数文件

原创 Oracle 作者:Otakuzel 时间:2016-01-31 11:40:22 0 删除 编辑
今天做了个实验,大致流程就是误删除所有参数文件,这时候我们启动数据库会发现数据库无法启动。
首先我们先删除参数文件,尝试重启
  1. SYS@PROD> startup
  2. ORA-01078: failure in processing system parameters
  3. LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initPROD.ora'
发现找不到相对应的参数文件,因为没有任何备份,所以尝试创建参数文件

  1. SYS@PROD> create spfile from memory;

  2. File created.
创建好后再次尝试重启
  1. SYS@PROD> startup
  2. ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
  3. ORACLE instance started.

  4. Total System Global Area 835104768 bytes
  5. Fixed Size 2257840 bytes
  6. Variable Size 541068368 bytes
  7. Database Buffers 289406976 bytes
  8. Redo Buffers 2371584 bytes
  9. Database mounted.
  10. Database opened.
这时候我们发现数据库报出ORA-32004的错误,查找官方文档觉得大致是由于过期参数造成的然后再在网上进行一些查询。
  1. ORA-32004: obsolete or deprecated parameter(s) specified for string instance
  2. Cause: Obsolete or deprecated parameters for this instance type were specified in the SPFILE or the PFILE on the server side.
  3. Action: See alert log for a list of parameters that are obsolete or deprecated. Remove them from the SPFILE or the server side PFILE.
网上大致的办法是SQL>alter system reset log_archive_start scope=spfile sid='*';无法在spfile中找到要删除的条目
  1. SYS@PROD> alter system reset sql_trace scope=spfile sid='*';
  2. alter system reset sql_trace scope=spfile sid='*'
  3. *
  4. ERROR at line 1:
  5. ORA-32010: cannot find entry to delete in SPFILE
由于spfile是二进制文件,所以我们决定生成pfile文件,并手动修改参数文件,我们先查看alert.log文件,查找到以下内容
  1. Deprecated system parameters with specified values:
  2.   background_dump_dest
  3.   user_dump_dest
  4. End of deprecated system parameter listing
关闭数据库,删除或者mv动态参数文件,以达到以静态参数文件启动的目的,然后再静态参数文件中删除background_dump_dest和user_dump_dest的参数文件后重启,发现重启正常不再报错。
  1. SYS@PROD> startup;
  2. ORACLE instance started.

  3. Total System Global Area 835104768 bytes
  4. Fixed Size         2257840 bytes
  5. Variable Size         541068368 bytes
  6. Database Buffers     289406976 bytes
  7. Redo Buffers         2371584 bytes
  8. Database mounted.
  9. Database opened.














来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30604784/viewspace-1984773/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: oracle 分区表详解
请登录后发表评论 登录
全部评论

注册时间:2015-12-01

  • 博文量
    58
  • 访问量
    220288