佳木斯湛栽影视文化发展公司

主頁 > 知識庫 > 在Oracle關(guān)閉情況下如何修改spfile的參數(shù)

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

熱門標(biāo)簽:AI電銷 Linux服務(wù)器 百度競價排名 地方門戶網(wǎng)站 服務(wù)外包 網(wǎng)站排名優(yōu)化 鐵路電話系統(tǒng) 呼叫中心市場需求

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

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

alter system set sga_max_size=960M scope=spfile;
shutdown immediate
startup

此時的startup報錯了,錯誤為:

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

原因分析

原來在Oracle11g中增加了memory_target參數(shù),sga_max_size必須比memory_target參數(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

實戰(zhàn)

[oracle@wing ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 14:04:46 2016
Copyright (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> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
通過vi修改pfile.new文件中相應(yīng)的參數(shù)(本文檔中是memory_target參數(shù)),修改后保存 
[oracle@wing ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 14:04:46 2016
Copyright (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 bytes
Fixed Size     2257520 bytes
Variable Size    415239568 bytes
Database Buffers   390070272 bytes
Redo Buffers    2523136 bytes
Database 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 immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@wing ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 14:08:40 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> 
SQL> startup
ORACLE instance started.
Total System Global Area 810090496 bytes
Fixed Size     2257520 bytes
Variable Size    415239568 bytes
Database Buffers   390070272 bytes
Redo Buffers    2523136 bytes
Database mounted.
Database opened.
SQL> show parameter memory 
NAME         TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
hi_shared_memory_address    integer
0
memory_max_target     big integer
800M
memory_target      big integer
800M
shared_memory_address    integer
0
SQL> show parameter sga
NAME         TYPE
------------------------------------ --------------------------------
VALUE
------------------------------
lock_sga        boolean
FALSE
pre_page_sga       boolean
FALSE
sga_max_size       big integer
776M
sga_target       big integer
740M
# 至此Oracle使用新的spfile啟動成功,參數(shù)也得到相應(yīng)的修改

總結(jié)

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

您可能感興趣的文章:
  • Oracle數(shù)據(jù)庫中的控制文件管理以及常用參數(shù)設(shè)置
  • Oracle 11g Dataguard參數(shù)詳解
  • oracle 存儲過程詳細(xì)介紹(創(chuàng)建,刪除存儲過程,參數(shù)傳遞等)
  • Oracle表的分類以及相關(guān)參數(shù)的詳解
  • Oracle 啟動例程 STARTUP參數(shù)說明
  • oracle初始化參數(shù)設(shè)置
  • oracle初始化參數(shù)設(shè)置
  • ORACLE隱藏參數(shù)查看及修改的方法

標(biāo)簽:衡水 黃山 蘭州 仙桃 銅川 崇左 湘潭 湖南

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《在Oracle關(guān)閉情況下如何修改spfile的參數(shù)》,本文關(guān)鍵詞  ;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    翁牛特旗| 玉龙| 郯城县| 林周县| 如皋市| 仙居县| 上思县| 达拉特旗| 凤翔县| 栖霞市| 海原县| 肇庆市| 杂多县| 辉县市| 清涧县| 六安市| 贵南县| 庆阳市| 资兴市| 全州县| 洛南县| 黄骅市| 东丰县| 万州区| 天水市| 白沙| 嘉峪关市| 叶城县| 德州市| 汝南县| 龙口市| 沾化县| 宁城县| 肥乡县| 马尔康县| 武定县| 保定市| 南平市| 鹤峰县| 赫章县| 彭山县|