Oracle管理

修改为lock_sga报错,11g已经自动管理

时间:2014/11/7 21:16:55  作者:solgle  来源:www.solgle.com  查看:1317  评论:0
内容摘要:修改Oracle参数后导致数据启动失败,如:设置lock_sga=true后重启数据库失败C:\Users\user>sqlplus sys/********@samp001_solgle as sysdbaSQL*Plus: Release 11.2.0.1.0 Product...
修改Oracle参数后导致数据启动失败,如:设置lock_sga=true后重启数据库失败
C:\Users\user>sqlplus sys/********@samp001_solgle as sysdba
 
SQL*Plus: Release 11.2.0.1.0 Production on Mon Nov 3 15:56:05 2014
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Data Mining and Real Application Testing options
SQL> alter system set lock_sga=true scope=spfile sid='*';
 
System altered.
 
SQL>
 
[grid@rac1 bin]$ ./srvctl stop database -d solgle
[grid@rac1 bin]$ ./srvctl start database -d solgle
PRCR-1079 : Failed to start resource ora.solgle.db
CRS-5017: The resource action "ora.solgle.db start" encountered the following error: 
ORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/11.2.0/log/rac1/agent/crsd/oraagent_oracle/oraagent_oracle.log".
 
CRS-5017: The resource action "ora.solgle.db start" encountered the following error: 
ORA-00847: MEMORY_TARGET/MEMORY_MAX_TARGET and LOCK_SGA cannot be set together
. For details refer to "(:CLSN00107:)" in "/u01/app/grid/11.2.0/log/rac2/agent/crsd/oraagent_oracle/oraagent_oracle.log".
 
CRS-2674: Start of 'ora.solgle.db' on 'rac1' failed
CRS-2674: Start of 'ora.solgle.db' on 'rac2' failed
CRS-2632: There are no more servers to try to place resource 'ora.solgle.db' on that would satisfy its placement policy
[grid@rac1 bin]$
 
---11g采用内存自动管理,明显与sga_lock冲突,其它参数修改错误类同
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
 
C:\Users\user>sqlplus sys/********@samp001_solgle as sysdba;
 
SQL*Plus: Release 11.2.0.1.0 Production on Tue Nov 4 09:07:13 2014
 
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
 
ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
 
Enter user-name:
 
---连接服务器看服务状态
[grid@rac1 bin]$ ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.DATA2.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.asm
               ONLINE  ONLINE       rac1                     Started             
               ONLINE  ONLINE       rac2                     Started             
ora.gsd
               OFFLINE OFFLINE      rac1                                         
               OFFLINE OFFLINE      rac2                                         
ora.net1.network
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ons
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                                         
ora.cvu
      1        ONLINE  ONLINE       rac1                                         
ora.solgle.db
      1        ONLINE  OFFLINE                               Instance Shutdown   
      2        ONLINE  OFFLINE                               Instance Shutdown   
ora.oc4j
      1        ONLINE  ONLINE       rac1                                         
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                         
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                         
ora.scan1.vip
      1        ONLINE  ONLINE       rac1                                         
[grid@rac1 bin]$ 
 
---数据库没有启动,监听不能识别该服务了
[grid@rac1 bin]$ su - oracle  
Password: 
[oracle@rac1 ~]$ sqlplus "/as sysdba"
 
SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 4 07:37:17 2014
 
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
ERROR:
ORA-12162: TNS:net service name is incorrectly specified
 
Enter user-name: 
[oracle@rac1 ~]$ 
[oracle@rac1 ~]$ export ORACLE_SID=solgle            
[oracle@rac1 ~]$ sqlplus "/as sysdba"
 
SQL*Plus: Release 11.2.0.4.0 Production on Tue Nov 4 07:39:18 2014
 
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
Connected to an idle instance.
 
SQL> 
---创建pfile
SQL> create pfile="hao123.ora" from spfile;
create pfile="hao123.ora" from spfile
             *
ERROR at line 1:
ORA-02236: invalid file name
 
[oracle@rac1 ~]$ cd /u02/app/product/11.2.0/dbname_1/dbs
[oracle@rac1 dbs]$ ls
hc_solgle1.dat  init.ora  initsolgle1.ora  orapwsolgle1  snapcf_solgle1.f
[oracle@rac1 dbs]$ cat initsolgle1.ora 
SPFILE='+DATA1/solgle/spfilesolgle.ora'
 
SQL> create pfile='/u02/app/product/11.2.0/dbname_1/dbs/hao123.ora' from spfile='+DATA1/solgle/spfilesolgle.ora';
 
File created.
 
SQL>
 
---回到主机
[oracle@rac1 ~]$ cd /u02/app/product/11.2.0/dbname_1/dbs/
[oracle@rac1 dbs]$ ls
hao123.ora  hc_solgle1.dat  init.ora  initsolgle1.ora  orapwsolgle1  snapcf_solgle1.f
[oracle@rac1 dbs]$ vi hao123.ora
... ...
solgle1.instance_number=1
solgle2.instance_number=2
######*.lock_sga=TRUE          ---注释掉这行(或者同理修改)
*.memory_target=1050673152
... ...
 
:wq!
 
---回到sqlplus
SQL> create spfile='+DATA1/solgle/spfilesolgle.ora' from pfile='/u02/app/product/11.2.0/dbname_1/dbs/hao123.ora';
 
File created.
 
SQL>
 
 
----回到服务器黑屏下
[oracle@rac1 dbs]$ su - grid
Password: 
[grid@rac1 ~]$ cd /u01/app/grid/11.2.0/bin/
[grid@rac1 bin]$ ./srvctl start database -d solgle
[grid@rac1 bin]$
 
---数据库已经启动成功
[grid@rac1 bin]$ ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.DATA2.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.asm
               ONLINE  ONLINE       rac1                     Started             
               ONLINE  ONLINE       rac2                     Started             
ora.gsd
               OFFLINE OFFLINE      rac1                                         
               OFFLINE OFFLINE      rac2                                         
ora.net1.network
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ons
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                                         
ora.cvu
      1        ONLINE  ONLINE       rac1                                         
ora.solgle.db
      1        ONLINE  ONLINE       rac1                     Open                
      2        ONLINE  ONLINE       rac2                     Open                
ora.oc4j
      1        ONLINE  ONLINE       rac1                                         
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                         
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                         
ora.scan1.vip
      1        ONLINE  ONLINE       rac1                                         
[grid@rac1 bin]$
 
 
标签:修改为lock_sga报错 

出处:solgle
网址:www.solgle.com
相关文章
    相关评论
     img1 img2 img3 img4 img5 img6 img7 img8 img9 img10
    评论者:      验证码:  点击获取验证码
       Copyright © 2013-2028 solgle.com,All rights reserved.[solgle.com] 公安机关备案号:51010802000219
    Email:solgle@solgle.com; weixin:cd1008610000 ICP:蜀ICP备14011070号-1