尽管oracle已经关闭,但是从sql命令设置了param

时间:2012-03-05 10:31:07

标签: sql oracle solaris

我有oracle版本10.2.0.4.0的Solaris机器

我有问题 - 我无法启动oracle

当我尝试通过命令启动oracle时:

       hagrp -online oracle1 -sys machine1a

我明白了:

      oracle1   machine1a      Y      N       PARTIAL|FAULTED

评论(hagrp -clear oracle1 -sys machine1a没有帮助)

检查并调试问题后,我发现oracle无法启动

因为错误的参数 - shared_pool_size (此参数设置为0,同时需要将此参数设置为2G)

所以我想将param shared_pool_size 设置为2G,但我不能,因为oracle已经关闭!!!

我的问题 - 如何在oracle中将参数 shared_pool_size 设置为2G是关闭的??? ,有可能???

  su - oracle -c  "sqlplus / as sysdba"

  SQL*Plus: Release 10.2.0.4.0 - Production on Mon Mar 5 12:10:44 2012

  Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.


  Connected to:
  Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
  With the Partitioning, OLAP, Data Mining and Real Application Testing options

  SQL> alter system set shared_pool_size=2G scope=BOTH;

init.ora :(来自我的机器)

 grep shared_pool_size /opt/oracle/v10.2.0/srvm/admin/init.ora

       #shared_pool_size =  52428800            # INITIAL
        shared_pool_size = 67108864           # datewarehouse, transaction processing 

1 个答案:

答案 0 :(得分:0)

如果您从旧式init.ora参数文件开始,您可以在其中进行更改。 scope中的alter system表示您使用的是spfile。您可以startup nomount进行参数更改,然后再次shutdown并尝试正常启动。

您确定要连接到正确的数据库吗? sqlplus命令的输出不会显示connected to an idle instance,因此看起来您连接的内容已经在运行。在运行任何内容之前检查您的位置,并记下您先更改的所有参数(例如,使用show parameters的输出)。


基于聊天中的对话......

您可以创建一个临时pfile,编辑它并测试它,然后在对新配置感到满意时重新创建spfile,最后重新启动它。步骤是:

create pfile='/tmp/init.ora' from spfile;
-- edit /tmp/init.ora and change parms as needed 
startup pfile='/tmp/init.ora';
-- repeat as needed until successful start
create spfile=’/path/to/spfile.ora’ from pfile=’/tmp/init.ora’;
shutdown
startup 'spfile=/path/to/spfile.ora';