分类: Oracle
2008-05-16 21:31:30
|
错误案例:参数文件,10.2.0 windows版本oracle的spfile和pfile默认在E:oracleproduct10.2.0db_1database目录下,SPFILEsid.ORA和INITsid.ORA,oracle默认用spfile,若spfile损坏,则自动用pfile,如果 两个都坏了,则提示错误。如果没有备份,那怎么办呢?
当然,你可以oracle自带的init模板,一个个参数地设置自己系统的参数文件。那这将是一件很糟的事情,它会浪费你宝贵的。 解决方法:
从alert_alaska.log警告日志里着手,因为它记录着一直以来数据库运行的情况,当然也包括每次启动的参数啦,我们要的就是:
processes = 150 __shared_pool_size = 75497472 __large_pool_size = 4194304 __java_pool_size = 4194304 __streams_pool_size = 0 nls_language = AMERICAN nls_territory = AMERICA sga_target = 167772160 control_files = E:ORACLEPRODUCT10.2.0ORADATAALASKACONTROL01.CTL, E:ORACLEPRODUCT10.2.0ORADATAALASKACONTROL02.CTL, E:ORACLEPRODUCT10.2.0ORADATAALASKACONTROL03.CTL db_block_size = 8192 __db_cache_size = 79691776 compatible = 10.2.0.1.0 db_file_multiblock_read_count= 16 db_recovery_file_dest = e:oracleproduct10.2.0/alash_recovery_area db_recovery_file_dest_size= 1073741824 log_checkpoints_to_alert = TRUE undo_management = AUTO undo_tablespace = UNDOTBS1 undo_retention = 900 remote_login_passwordfile= EXCLUSIVE db_domain = com.cn dispatchers = '(PROTOCOL=TCP) (SERVICE=alaskaXDB)' #用 ' ' 引起它们 job_queue_processes = 10 audit_file_dest = E:ORACLEPRODUCT10.2.0ADMINALASKAADUMP background_dump_dest = E:ORACLEPRODUCT10.2.0ADMINALASKABDUMP user_dump_dest = E:ORACLEPRODUCT10.2.0ADMINALASKAUDUMP core_dump_dest = E:ORACLEPRODUCT10.2.0ADMINALASKACDUMP db_name = alaska open_cursors = 300 pga_aggregate_target = 16777216
复制以前成功启动的参数语句(如上代码段)到一个中,只需把dispatchers = (PROTOCOL=TCP) (SERVICE=alaskaXDB)的值加上''(单引号),变成dispatchers = '(PROTOCOL=TCP) (SERVICE=alaskaXDB)',保存为c:pfile.
最后运行:startup pfile='c:pfile.txt';即可完成。 |