我执行下面的语句:
  alter system set processes=2 scope=spfile
结果oracle无法启动了。请问如何才能恢复原来的配置?我是在window上安装的oracle10g。

解决方案 »

  1.   

    有这么一个文件: ora92\database\SPFILE你的实例名.ORA你把process这一项用editplus文件改回原值就可以了。(修改之前一定要备份哦)另外,processes最小也需要10个以上的,系统本上要用上不少,这个数值如果不是非常庞大,对性能没什么影响的,不用去动他
      

  2.   


    这个方法很危险,spfile是二进制文件,最好不要手工修改。你的数据库启动不了,可以用以下方式恢复先到nomount状态
    SQL>startup nomount;SQL>alter system set processes=150 scope=spfile;SQL>shutdown immediate;SQL>startup;
      

  3.   

    spfile是二进制的,不要修改可以通过修改pfile启动
    create pfile from spfile;
    手动修改pfile设置processes,再从pfile启动starup pfile='your_pfile';启动成功后,再
    create spfile from pfile='your_pfile';
    shutdown immediate;
    startup;
      

  4.   

    1. create pfile from spfile
    2. 修改pfile文件中的processes参数,保存
    3. startup pfile=/.../initSID.ora
    4. create spfile from pfile;
    5. shutdown immediate  //5,6 可不做
    6. startup
      

  5.   

    Microsoft Windows XP [版本 5.1.2600]
    (C) 版权所有 1985-2001 Microsoft Corp.D:\Documents and Settings\Administrator>net start oracleserviceprod
    OracleServicePROD 服务正在启动 .
    OracleServicePROD 服务已经启动成功。
    D:\Documents and Settings\Administrator>set oracle_sid=prodD:\Documents and Settings\Administrator>sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 10 14:54:26 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.SQL> conn /as sysdba
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.Total System Global Area  356515840 bytes
    Fixed Size                  1248960 bytes
    Variable Size             109052224 bytes
    Database Buffers          239075328 bytes
    Redo Buffers                7139328 bytes
    Database mounted.
    Database opened.
    SQL> show parameter processes;NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     150
    SQL> alter system set processes=2 scope=spfile;System altered.SQL> show parameter processes;NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     150
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> host notepad D:\app\oracle\product\10.2.0\db_1\dbs\SPFILEPROD.ORA  --确认:*.processes=2SQL> startup  --启动失败:ctr+c退出
    ^C
    D:\Documents and Settings\Administrator>sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 10 14:58:51 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.SQL> conn /as sysdba
    Connected to an idle instance.
    SQL> host notepad D:\app\oracle\product\10.2.0\admin\prod\bdump\alert_prod.log --报错:ORA-00020: maximum number of processes () exceededSQL>
    SQL> host copy D:\app\oracle\product\10.2.0\admin\prod\pfile\init.ora.1262009214
    40 D:\app\oracle\product\10.2.0\db_1\dbs\initprod.ora
    已复制         1 个文件。SQL> startup pfile='D:\app\oracle\product\10.2.0\db_1\dbs\initprod.ora'
    ORA-10997: another startup/shutdown operation of this instance inprogress
    ORA-09968: unable to lock file
    SQL> exit
    DisconnectedD:\Documents and Settings\Administrator>sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 10 15:01:53 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.SQL> conn /as sysdba
    Connected to an idle instance.
    SQL> startup pfile='D:\app\oracle\product\10.2.0\db_1\dbs\initprod.ora'
    ORA-10997: another startup/shutdown operation of this instance inprogress
    ORA-09968: unable to lock file
    SQL> exit
    DisconnectedD:\Documents and Settings\Administrator>net stop oracleserviceprod
    OracleServicePROD 服务正在停止.
    OracleServicePROD 服务已成功停止。
    D:\Documents and Settings\Administrator>net start oracleserviceprod
    OracleServicePROD 服务正在启动 .
    OracleServicePROD 服务已经启动成功。
    D:\Documents and Settings\Administrator>sqlplus /nologSQL*Plus: Release 10.2.0.1.0 - Production on Mon Aug 10 15:02:33 2009Copyright (c) 1982, 2005, Oracle.  All rights reserved.SQL> conn /as sysdba
    Connected to an idle instance.
    SQL> startup pfile='D:\app\oracle\product\10.2.0\db_1\dbs\initprod.ora'
    ORACLE instance started.Total System Global Area  356515840 bytes
    Fixed Size                  1248960 bytes
    Variable Size             109052224 bytes
    Database Buffers          239075328 bytes
    Redo Buffers                7139328 bytes
    Database mounted.
    Database opened.
    SQL> create spfile='D:\app\oracle\product\10.2.0\db_1\dbs\SPFILEPROD.ORA' from p
    file='D:\app\oracle\product\10.2.0\db_1\dbs\initPROD.ORA';File created.SQL> show parameter processes;NAME                                 TYPE        VALUE
    ------------------------------------ ----------- ------------------------------
    aq_tm_processes                      integer     0
    db_writer_processes                  integer     1
    gcs_server_processes                 integer     0
    job_queue_processes                  integer     10
    log_archive_max_processes            integer     2
    processes                            integer     150
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.Total System Global Area  356515840 bytes
    Fixed Size                  1248960 bytes
    Variable Size             109052224 bytes
    Database Buffers          239075328 bytes
    Redo Buffers                7139328 bytes
    Database mounted.
    Database opened.
    SQL>
      

  6.   

    pwd /oracle/product/db/dbs如果是spfile启动的,你又无法修改它了(spfile 在裸设备上)
    怎么构造一个pfile来启动实例呢?
    做一个pfile,链接到当前的spfile地址,
    同时在下面再加一行,需要修改的参数,比如LZ这个例子,process 参数设置错误了,
    够建造 pfile如下:more initcctt1.ora
    SPFILE='+DG_DATA/cctt/spfilecctt.ora'vi 编辑initcctt1.ora
    下面增加一行
    *.processes=1500
    变成more initcctt1.ora
    SPFILE='+DG_DATA/cctt/spfilecctt.ora'
    *.processes=1500重启动
    startup pfile='/oracle/product/db/dbs/initcctt1.ora';
    别的没有错误的话应该就能起来了