• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase
您的位置:首页 > 数据库 >oracle > 在Oracle关闭情况下如何修改spfile的参数

在Oracle关闭情况下如何修改spfile的参数

作者:Wing''''s Notes 字体:[增加 减小] 来源:互联网 时间:2017-05-11

Wing''''s Notes通过本文主要向大家介绍了oracle spfile,oracle spfile位置,oracle 重建spfile,oracle spfile pfile,oracle 创建spfile等相关知识,希望本文的分享对您有所帮助

发现问题

我使用的Oracle11g,当我敲下如下一段命令后,就让我傻眼了。。

alter system set sga_max_size=960M scope=spfile;
shutdown immediate
startup
</div>

此时的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.
</div>

原因分析

原来在Oracle11g中增加了memory_target参数,sga_max_size必须比memory_target参数小。那么问题来了,此时我已经关闭Oracle了,spfile文件是二进制文件,又不能手动修改,那么我该怎么办呢。。好捉急好捉急。。。

解决思路

通过pfile启动Oracle–>在Oracle中通过create pfile='' from spfile=''取出spfile的内容(pfile是可以手动修改的)–>修改新建的pfile–>以新的pfile启动Oracle–>在Oracle中通过create spfile='' from pfile=''获得修改后的spfile

实战

[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文件中相应的参数(本文档中是memory_target参数),修改后保存 
[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启动成功,参数也得到相应的修改
</div>

总结

以上就是关于如何在Oracle关闭的情况下修改spfile里面参数的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流。

</div>
分享到:QQ空间新浪微博腾讯微博微信百度贴吧QQ好友复制网址打印

您可能想查找下面的文章:

  • 在Oracle关闭情况下如何修改spfile的参数

相关文章

  • 2017-05-11oracle 函数
  • 2017-05-11Oracle 数据库优化实战心得总结
  • 2017-05-11Oracle如何直接运行OS命令(上)第1/2页
  • 2017-05-11Oracle数据库的字段约束创建和维护示例
  • 2017-09-17Oracle数据库--表锁的情况查询
  • 2017-05-11oracle11数据库安装图文教程
  • 2017-05-11Oracle 11g数据库详细安装图文教程
  • 2017-05-11如何保持Oracle数据库的优良性能
  • 2017-08-25使用oracle 出现invalid uesr.table.column,table.column
  • 2017-05-11对学Oracle数据库初学者的开场篇

文章分类

  • MsSql
  • Mysql
  • oracle
  • MariaDB
  • DB2
  • SQLite
  • PostgreSQL
  • MongoDB
  • Redis
  • Access
  • 数据库其它
  • sybase
  • HBase

最近更新的内容

    • Oracle中CONCAT,SUBSTR,REPLACE的实例介绍
    • ip修改后orcale服务无法启动问题解决
    • Oralce数据导入出现(SYSTEM.PROC_AUDIT)问题处理方法
    • Microsoft SQL Server 安全问题
    • Oracle的数据字典技术简析
    • Oracle与SQL Server在企业应用的比较
    • Oracle组件实现动态Web数据库
    • 整理Oracle数据库中数据查询优化的一些关键点
    • Oracle 手动创建数据库步骤详解
    • Oracle 8i字符集乱码问题析及其解决办法

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有