实验目的:当参数文件损坏无备份下,测试如何从警告日志还原参数文件
1.打开警告日志,取回下列参数
processes = 150
sessions = 225
__shared_pool_size = 62914560
__large_pool_size = 4194304
__java_pool_size = 4194304
__streams_pool_size = 0
sga_target = 260046848
control_files = /oracle/oradata/zwb/control01.ctl, /oracle/oradata/zwb/control02.ctl, /oracle/oradata/zwb/control03.ctl
db_block_size = 8192
__db_cache_size = 184549376
compatible = 10.2.0.1.0
log_archive_dest_1 = location=/oracle/archlog
archive_lag_target = 0
db_file_multiblock_read_count= 16
db_recovery_file_dest = /oracle/flashback
db_recovery_file_dest_size= 1073741824
db_flashback_retention_target= 2880
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain =
dispatchers = (PROTOCOL=TCP) (SERVICE=zwbXDB)
job_queue_processes = 10
background_dump_dest = /oracle/app/admin/zwb/bdump
user_dump_dest = /oracle/app/admin/zwb/udump
core_dump_dest = /oracle/app/admin/zwb/cdump
audit_file_dest = /oracle/app/admin/zwb/adump
db_name = zwb
open_cursors = 300
pga_aggregate_target = 85983232
2.用UE编辑:1)去掉最左侧空列,2)目录均加上引号,3)去掉隐藏参数,4)去掉空参数
后正确如下:(易错点'(PROTOCOL=TCP) (SERVICE=zwbXDB)')也要加引号
processes = 150
sessions = 225
sga_target = 260046848
control_files = '/oracle/oradata/zwb/control01.ctl', '/oracle/oradata/zwb/control02.ctl', '/oracle/oradata/zwb/control03.ctl'
db_block_size = 8192
compatible = 10.2.0.1.0
log_archive_dest_1 = 'location=/oracle/archlog'
archive_lag_target = 0
db_file_multiblock_read_count= 16
db_recovery_file_dest = '/oracle/flashback'
db_recovery_file_dest_size= 1073741824
db_flashback_retention_target= 2880
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
dispatchers = '(PROTOCOL=TCP) (SERVICE=zwbXDB)'
job_queue_processes = 10
background_dump_dest = '/oracle/app/admin/zwb/bdump'
user_dump_dest = '/oracle/app/admin/zwb/udump'
core_dump_dest = '/oracle/app/admin/zwb/cdump'
audit_file_dest = '/oracle/app/admin/zwb/adump'
db_name = zwb
open_cursors = 300
pga_aggregate_target = 85983232
3.在参数文件目录重建initzwb.ora,拷贝进参数文件
$ cd $ORACLE_HOME/dbs
$ vi initzwb.ora
实验结果:可正常重启