备份与恢复(Parameter 文件恢复篇)

 

备份与恢复(Parameter 文件恢复篇)

 

环境:oracle 版本10.2.0.1

系统:contes 5.6

 

 

实验(一),parameter文件损坏之利用alert.log日志编写恢复。

 

1、  实验环境,直接删除参数文件。

[ora@dg-pp dbs]$ rm -rf initoracle.ora
2
、关闭数据库(shutdown immediate),并开启数据库报错信息

SQL> startup

ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/opt/oracle/product/10.2.0/db_1/dbs/initoracle.ora'

 

恢复:

1、  查看alert日志,截取开启数据库日志

processes                = 150

  sga_target               = 457179136

  control_files            = /opt/oracle/oradata/oracle/control01.ctl, /opt/oracle/oradata/oracle/control02.ctl, /opt/oracle/oradata/oracle/control03.ctl

  db_block_size            = 8192

  compatible               = 10.2.0.1.0

  db_file_multiblock_read_count= 16

  db_recovery_file_dest    = /opt/oracle/flash_recovery_area

  db_recovery_file_dest_size= 2147483648

  undo_management          = AUTO

  undo_tablespace          = UNDOTBS1

  remote_login_passwordfile= EXCLUSIVE

  db_domain                =

  dispatchers              = (PROTOCOL=TCP) (SERVICE=oracleXDB)

  job_queue_processes      = 10

  background_dump_dest     = /opt/oracle/admin/oracle/bdump

  user_dump_dest           = /opt/oracle/admin/oracle/udump

  core_dump_dest           = /opt/oracle/admin/oracle/cdump

  audit_file_dest          = /opt/oracle/admin/oracle/adump

  db_name                  = oracle

  open_cursors             = 300

  pga_aggregate_target     = 150994944

 

2vi  initoracle.ora

processes                = 150

  sga_target               = 457179136

  control_files            = /opt/oracle/oradata/oracle/control01.ctl, /opt/oracle/oradata/oracle/control02.ctl, /opt/oracle/oradata/oracle/control03.ctl

  db_block_size            = 8192

  compatible               = 10.2.0.1.0

  db_file_multiblock_read_count= 16

  db_recovery_file_dest    = /opt/oracle/flash_recovery_area

  db_recovery_file_dest_size= 2147483648

  undo_management          = AUTO

  undo_tablespace          = UNDOTBS1

  remote_login_passwordfile= EXCLUSIVE

  db_domain                =

  dispatchers              = (PROTOCOL=TCP) (SERVICE=oracleXDB)

  job_queue_processes      = 10

  background_dump_dest     = /opt/oracle/admin/oracle/bdump

  user_dump_dest           = /opt/oracle/admin/oracle/udump

  core_dump_dest           = /opt/oracle/admin/oracle/cdump

  audit_file_dest          = /opt/oracle/admin/oracle/adump

  db_name                  = oracle

  open_cursors             = 300

  pga_aggregate_target     = 150994944

 

3、开启数据库

SQL> startup

ORA-01078: failure in processing system parameters

LRM-00116: syntax error at 'dispatchers' following '='

 

进行vi initoracle.ora以下修改

#db_domain               =

  dispatchers              ='(PROTOCOL=TCP) (SERVICE=oracleXDB)'

添加’’,就OK了。

再次开启数据库

SQL> startup

ORACLE instance started.

 

Total System Global Area  457179136 bytes

Fixed Size                  1219976 bytes

Variable Size             134218360 bytes

Database Buffers          318767104 bytes

Redo Buffers                2973696 bytes

Database mounted.

Database opened.

 

总结:alert日志里copy过来的一般可能会少’’,所以在编辑initoracle.ora文件的时候,如果提示错误,可以添加’’

 

 

 

 

你可能感兴趣的:(备份与恢复(Parameter 文件恢复篇))