国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > Oracle > 正文

在Oracle關(guān)閉情況下如何修改spfile的參數(shù)

2024-08-29 13:59:31
字體:
供稿:網(wǎng)友

發(fā)現(xiàn)問題

我使用的Oracle11g,當(dāng)我敲下如下一段命令后,就讓我傻眼了。。

alter system set sga_max_size=960M scope=spfile;shutdown immediatestartup

此時(shí)的startup報(bào)錯(cuò)了,錯(cuò)誤為:

SQL> startupORA-00844: Parameter not taking MEMORY_TARGET into accountORA-00851: SGA_MAX_SIZE 985661440 cannot be set to more than MEMORY_TARGET 784334848.

原因分析

原來在Oracle11g中增加了memory_target參數(shù),sga_max_size必須比memory_target參數(shù)小。那么問題來了,此時(shí)我已經(jīng)關(guān)閉Oracle了,spfile文件是二進(jìn)制文件,又不能手動修改,那么我該怎么辦呢。。好捉急好捉急。。。

解決思路

通過pfile啟動Oracle–>在Oracle中通過create pfile='' from spfile=''取出spfile的內(nèi)容(pfile是可以手動修改的)–>修改新建的pfile–>以新的pfile啟動Oracle–>在Oracle中通過create spfile='' from pfile=''獲得修改后的spfile

實(shí)戰(zhàn)

[oracle@wing ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 14:04:46 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to an idle instance.SQL> create pfile='/home/oracle/pfile.new' from spfile='/u01/app/oracle/product/11.2.0/db_1/dbs/spfilewingdb.ora';File created.SQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options通過vi修改pfile.new文件中相應(yīng)的參數(shù)(本文檔中是memory_target參數(shù)),修改后保存 [oracle@wing ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 14:04:46 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to an idle instance.SQL> startup pfile='/home/oracle/pfile.new'ORACLE instance started.Total System Global Area 810090496 bytesFixed Size     2257520 bytesVariable Size    415239568 bytesDatabase Buffers   390070272 bytesRedo Buffers    2523136 bytesDatabase mounted.Database opened.SQL> create spfile='/u01/app/oracle/product/11.2.0/db_1/dbsspfilewingdb.ora' from pfile='/home/oracle/pfile.new';File created.SQL> shutdown immediateDatabase closed.Database dismounted.ORACLE instance shut down.SQL> exitDisconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing options[oracle@wing ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 14:08:40 2016Copyright (c) 1982, 2013, Oracle. All rights reserved.Connected to an idle instance.SQL> SQL> startupORACLE instance started.Total System Global Area 810090496 bytesFixed Size     2257520 bytesVariable Size    415239568 bytesDatabase Buffers   390070272 bytesRedo Buffers    2523136 bytesDatabase mounted.Database opened.SQL> show parameter memory NAME         TYPE------------------------------------ --------------------------------VALUE------------------------------hi_shared_memory_address    integer0memory_max_target     big integer800Mmemory_target      big integer800Mshared_memory_address    integer0SQL> show parameter sgaNAME         TYPE------------------------------------ --------------------------------VALUE------------------------------lock_sga        booleanFALSEpre_page_sga       booleanFALSEsga_max_size       big integer776Msga_target       big integer740M# 至此Oracle使用新的spfile啟動成功,參數(shù)也得到相應(yīng)的修改

總結(jié)

以上就是關(guān)于如何在Oracle關(guān)閉的情況下修改spfile里面參數(shù)的全部內(nèi)容了,希望本文的內(nèi)容對大家的學(xué)習(xí)或者工作能帶來一定的幫助,如果有疑問大家可以留言交流。


注:相關(guān)教程知識閱讀請移步到oracle教程頻道。
發(fā)表評論 共有條評論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 赤城县| 新宾| 黑水县| 安国市| 电白县| 贞丰县| 高陵县| 泸州市| 湘阴县| 石家庄市| 汽车| 溧阳市| 汽车| 大田县| 天峻县| 岳阳市| 北京市| 德令哈市| 游戏| 阜南县| 大余县| 祁门县| 和顺县| 阿拉善左旗| 乐陵市| 五原县| 类乌齐县| 巩留县| 丹寨县| 富阳市| 青田县| 双桥区| 海伦市| 满洲里市| 潞城市| 蓬莱市| 滕州市| 绥滨县| 仙居县| 兴文县| 尼木县|