備份與恢復(Parameter 檔案恢復篇)

lovehewenyu發表於2012-07-19

備份與恢復(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檔案的時候,如果提示錯誤,可以新增’’

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26442936/viewspace-736066/,如需轉載,請註明出處,否則將追究法律責任。

相關文章