• [RAC Clusterware] ora01506错误(转)


    1#
     
     发表于 2013-2-26 12:05:31 | 查看: 298| 回复: 18
    现象:

    11.2.0.3的RAC

    修改了memory参数后重启,出现错误,再用/opt/app/oracle/admin/zxdb/pfile/init.ora.920201215274启动后
    创建spfle:

    create spfile='+data/zxdb/spfilezxdb.ora' from pfile;


    之后shutdown,再用

    srvctl start database -d zxdb -o mount

    启动失败:
    1. PRCR-1079 : Failed to start resource ora.zxdb.db
    2. CRS-5017: The resource action "ora.zxdb.db start" encountered the following erro                                                                              r:
    3. ORA-01506: missing or illegal database name
    4. . For details refer to "(:CLSN00107:)" in "/opt/app/grid/product/11.2.0/grid/log                                                                              /zhixing-db1/agent/crsd/oraagent_oracle/oraagent_oracle.log".
    5. CRS-2674: Start of 'ora.zxdb.db' on 'zhixing-db1' failed
    6. CRS-5017: The resource action "ora.zxdb.db start" encountered the following erro                                                                              r:
    7. ORA-01506: missing or illegal database name
    8. . For details refer to "(:CLSN00107:)" in "/opt/app/grid/product/11.2.0/grid/log                                                                              /zhixing-db2/agent/crsd/oraagent_oracle/oraagent_oracle.log".
    9. CRS-2674: Start of 'ora.zxdb.db' on 'zhixing-db2' failed
    10. CRS-2632: There are no more servers to try to place resource 'ora.zxdb.db' on th                                                                              at would satisfy its placement policy
    复制代码
    请问maclean如何解决?
    如需详细日志请回复。
     
     
     
    2#
     
     发表于 2013-2-26 12:07:16
    srvctl  config database -d zxdb -a

    ls -l $ORACLE_HOME/dbs

    上传 crsd.log 和 RDBMS的alert.log
     
     
       
    3#
     
     发表于 2013-2-26 12:10:32
    1. oracle@zhixing-db1:/opt/app/oracle/product/11.2.0/db1/dbs> srvctl config database -d zxdb -a
    2. Database unique name: zxdb
    3. Database name: zxdb
    4. Oracle home: /opt/app/oracle/product/11.2.0/db1
    5. Oracle user: oracle
    6. Spfile: +DATA/zxdb/spfilezxdb.ora
    7. Domain:
    8. Start options: open
    9. Stop options: immediate
    10. Database role: PRIMARY
    11. Management policy: AUTOMATIC
    12. Server pools: zxdb
    13. Database instances: zxdb1,zxdb2
    14. Disk Groups: DATA,RECOVERY,ARCHIVELOG,LOGFILE
    15. Mount point paths:
    16. Services:
    17. Type: RAC
    18. Database is enabled
    19. Database is administrator managed
    20. oracle@zhixing-db1:/opt/app/oracle/product/11.2.0/db1/dbs> ls -l $ORACLE_HOME/dbs
    21. total 24
    22. -rw-rw---- 1 oracle asmadmin 1544 Feb 26 11:19 hc_zxdb1.dat
    23. -rw-r--r-- 1 oracle oinstall 2851 May 15  2009 init.ora
    24. -rw-r--r-- 1 oracle oinstall   58 Dec 28 18:16 initzxdb1.ora
    25. -rw-r--r-- 1 oracle oinstall 1648 Dec 28 18:15 initzxdb1.ora.bak
    26. -rw-r----- 1 oracle oinstall 1588 Dec 28 16:24 initzxdb1.ora.bak.zhixing-db1
    27. -rw-r----- 1 oracle oinstall 1536 Oct 20 15:04 orapwzxdb1
    28. oracle@zhixing-db1:/opt/app/oracle/product/11.2.0/db1/dbs>
    复制代码
     
     
       
    4#
     
     发表于 2013-2-26 12:14:27
    还有这个文件

    /zhixing-db2/agent/crsd/oraagent_oracle/oraagent_oracle.log


    cat /opt/app/oracle/admin/zxdb/pfile/init.ora.920201215274
     
     
       
    5#
     
     发表于 2013-2-26 12:18:44
    <IGNORE_JS_OP style="WORD-WRAP: break-word"> alert_zxdb1.rar (594.9 KB, 下载次数: 4) 

    crsd和alert日志在rar包中。
     
     
       
    6#
     
     发表于 2013-2-26 12:23:59
    1. oracle@zhixing-db1:~> cat /opt/app/oracle/admin/zxdb/pfile/init.ora.9202012152743
    2. ##############################################################################
    3. # Copyright (c) 1991, 2001, 2002 by Oracle Corporation
    4. ##############################################################################
    5. ###########################################
    6. # Archive
    7. ###########################################
    8. log_archive_dest_1='LOCATION=+ARCHIVELOG'
    9. log_archive_format=%t_%s_%r.dbf
    10. ###########################################
    11. # Cache and I/O
    12. ###########################################
    13. db_block_size=8192
    14. ###########################################
    15. # Cluster Database
    16. ###########################################
    17. remote_listener=zhixing-scan:1521
    18. ###########################################
    19. # Cursors and Library Cache
    20. ###########################################
    21. open_cursors=300
    22. ###########################################
    23. # Database Identification
    24. ###########################################
    25. db_domain=""
    26. db_name="zxdb"
    27. ###########################################
    28. # File Configuration
    29. ###########################################
    30. db_create_file_dest="+DATA"
    31. db_create_online_log_dest_1=+LOGFILE
    32. db_recovery_file_dest="+RECOVERY"
    33. db_recovery_file_dest_size=10737418240
    34. ###########################################
    35. # Miscellaneous
    36. ###########################################
    37. compatible=11.2.0.0.0
    38. diagnostic_dest=/opt/app/oracle
    39. ###########################################
    40. # Processes and Sessions
    41. ###########################################
    42. processes=150
    43. ###########################################
    44. # SGA Memory
    45. ###########################################
    46. sga_target=3726639104
    47. ###########################################
    48. # Security and Auditing
    49. ###########################################
    50. audit_file_dest="/opt/app/oracle/admin/zxdb/adump"
    51. audit_trail=db
    52. remote_login_passwordfile=exclusive
    53. ###########################################
    54. # Shared Server
    55. ###########################################
    56. dispatchers="(PROTOCOL=TCP) (SERVICE=zxdbXDB)"
    57. ###########################################
    58. # Sort, Hash Joins, Bitmap Indexes
    59. ###########################################
    60. pga_aggregate_target=1241513984
    61. control_files=("+LOGFILE/zxdb/controlfile/current.256.797180689")
    62. cluster_database=true
    63. zxdb1.instance_number=1
    64. zxdb2.instance_number=2
    65. zxdb2.thread=2
    66. zxdb1.undo_tablespace=UNDOTBS1
    67. zxdb2.undo_tablespace=UNDOTBS2
    68. zxdb1.thread=1
    复制代码
     
     
       
    7#
     
     发表于 2013-2-26 12:28:43
    <IGNORE_JS_OP style="WORD-WRAP: break-word"> oraagent_oracle.rar (52.77 KB, 下载次数: 4)
     
     
       
    8#
     
     发表于 2013-2-26 12:33:01
    2013-02-26 11:30:31.322: [ora.zxdb.db][369084752] {1:25283:57673} [start] clsnUtils::error Exception type=2 string=
    CRS-5017: The resource action "ora.zxdb.db start" encountered the following error: 
    ORA-01506: missing or illegal database name
    . For details refer to "(:CLSN00107:)" in "/opt/app/grid/product/11.2.0/grid/log/zhixing-db2/agent/crsd/oraagent_oracle/oraagent_oracle.log".








    ORA-01506 ==》 一般是db_name 不正确

    手动  sqlplus / as sysdba

    create pfile='/tmp/pfile_a1'  from spfile;
    startup nomount
    show parameter spfile 
    alter database mount;


    cat  /tmp/pfile_a1

    看是否遇到该错误, 如果是 那么 手动startup 

    startup mount pfile='/opt/app/oracle/admin/zxdb/pfile/init.ora.9202012152743';

    怀疑你的spfile有问题



     
     
       
    9#
     
     发表于 2013-2-26 12:38:03
    1. oracle@zhixing-db1:/opt/app/oracle/admin/zxdb/pfile> sqlplus / as sysdba
    2. SQL*Plus: Release 11.2.0.3.0 Production on Tue Feb 26 12:33:21 2013
    3. Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    4. Connected to an idle instance.
    5. SQL> create pfile='/tmp/pfile_a1' from spfile;
    6. create pfile='/tmp/pfile_a1' from spfile
    7. *
    8. ERROR at line 1:
    9. ORA-01565: error in identifying file '?/dbs/spfile@.ora'
    10. ORA-27037: unable to obtain file status
    11. Linux-x86_64 Error: 2: No such file or directory
    12. Additional information: 3
    13. SQL>
    复制代码
     
     
       
    10#
     
     发表于 2013-2-26 12:41:18
    走后面的action plan 2
     
     
       
    11#
     
     发表于 2013-2-26 12:49:19
    1. SQL> startup mount pfile='/opt/app/oracle/admin/zxdb/pfile/init.ora.9202012152743';
    2. ORACLE instance started.
    3. Total System Global Area 3724607488 bytes
    4. Fixed Size                  2233880 bytes
    5. Variable Size             805308904 bytes
    6. Database Buffers         2902458368 bytes
    7. Redo Buffers               14606336 bytes
    8. Database mounted.
    9. SQL> create pfile='/tmp/pfile_a1' from spfile;
    10. create pfile='/tmp/pfile_a1' from spfile
    11. *
    12. ERROR at line 1:
    13. ORA-01565: error in identifying file '?/dbs/spfile@.ora'
    14. ORA-27037: unable to obtain file status
    15. Linux-x86_64 Error: 2: No such file or directory
    16. Additional information: 3
    17. SQL> create spfile='+data/zxdb/spfilezxdb.ora' from pfile;
    18. File created.
    19. SQL> create pfile='/tmp/pfile_a1' from spfile;
    20. create pfile='/tmp/pfile_a1' from spfile
    21. *
    22. ERROR at line 1:
    23. ORA-01565: error in identifying file '?/dbs/spfile@.ora'
    24. ORA-27037: unable to obtain file status
    25. Linux-x86_64 Error: 2: No such file or directory
    26. Additional information: 3
    27. SQL> show parameter spfile
    28. NAME                                 TYPE        VALUE
    29. ------------------------------------ ----------- ------------------------------
    30. spfile                               string
    31. SQL> alter system set spfile='+data/zxdb/spfilezxdb.ora';
    32. System altered.
    33. SQL> show parameter spfile
    34. NAME                                 TYPE        VALUE
    35. ------------------------------------ ----------- ------------------------------
    36. spfile                               string      +data/zxdb/spfilezxdb.ora
    37. SQL> create pfile='/tmp/pfile_a1' from spfile;
    38. File created.
    39. SQL> show parameter db_name
    40. NAME                                 TYPE        VALUE
    41. ------------------------------------ ----------- ------------------------------
    42. db_name                              string      zxdb
    43. SQL> show parameter target
    44. NAME                                 TYPE        VALUE
    45. ------------------------------------ ----------- ------------------------------
    46. archive_lag_target                   integer     0
    47. db_flashback_retention_target        integer     1440
    48. fast_start_io_target                 integer     0
    49. fast_start_mttr_target               integer     0
    50. memory_max_target                    big integer 0
    51. memory_target                        big integer 0
    52. parallel_servers_target              integer     256
    53. pga_aggregate_target                 big integer 1184M
    54. sga_target                           big integer 3568M
    55. SQL> shutdown immeidate
    56. SP2-0717: illegal SHUTDOWN option
    57. SQL> shutdown immediate
    58. ORA-01109: database not open
    59. Database dismounted.
    60. ORACLE instance shut down.
    61. SQL> startup nomount
    62. ORA-01506: missing or illegal database name
    63. SQL> exit
    64. Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    65. With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
    66. Data Mining and Real Application Testing options
    67. oracle@zhixing-db1:/opt/app/oracle/admin/zxdb/pfile> cat /tmp/
    68. .ICE-unix/                                        crsctl                                            oraInstall2012-10-20_11-36-13-AM.out.zhixing-db2
    69. .X0-lock                                          dbca/                                             orbit-gdm/
    70. .X11-unix/                                        getfileinfoconfigfile_1183862985462518328.txt     orbit-root/
    71. .esd-0/                                           gpg-2CrXu0/                                       pfile_a1
    72. .gnome_thumbnail.R6JKKW.4EKJKW                    hsperfdata_grid/                                  pulse-KmuUER3JsMqF/
    73. .linux_release                                    hsperfdata_oracle/                                scim-bridge-0.3.0.socket-0@localhost:0.0
    74. .oracle/                                          hsperfdata_root/                                  scim-helper-manager-socket-root
    75. CVU_11.2.0.1.0_grid/                              installCopyFile.lst                               scim-panel-socket:0-root
    76. CVU_11.2.0.1.0_oracle/                            installDirFile.lst                                scim-socket-frontend-root
    77. CVU_11.2.0.3.0_grid/                              installExcludeFile.lst                            silentInstall.log
    78. CVU_11.2.0.3.0_oracle/                            installRemoveDirFile.lst                          ssh-LwRhz2144/
    79. CVU_11.2.0.3.0_resource/                          installRemoveFile.lst                             virtual-root.0pLqYZ/
    80. Cleanup2012-10-20_11-36-13-AM.log                 keyring-YWQQmz/                                   virtual-root.IwX79C/
    81. DetachHome2012-10-20_11-36-13-AM.log.zhixing-db2  logs/                                             virtual-root.hL1KHg/
    82. OraInstall2012-09-11_08-53-45PM/                  lost+found/                                       virtual-root.mDvTbV/
    83. OraInstall2012-10-20_11-21-25-AM/                 mk_initrd.log                                     virtual-root.pGVst2/
    84. OraInstall2012-10-20_11-36-13-AM/                 oraInstall2012-10-20_11-36-13-AM.err.zhixing-db2
    85. oracle@zhixing-db1:/opt/app/oracle/admin/zxdb/pfile> cat /tmp/pfile_a1
    86. oracle@zhixing-db1:/opt/app/oracle/admin/zxdb/pfile>
    复制代码
     
     
       
    12#
     
     发表于 2013-2-26 12:49:54
    pfile_a1中没东西。
     
     
       
    13#
     
     发表于 2013-2-26 12:57:14
    startup mount pfile='/opt/app/oracle/admin/zxdb/pfile/init.ora.9202012152743';

    alter database open;

    create spfile='+data/zxdb/spfilezxdb.ora' from pfile='/opt/app/oracle/admin/zxdb/pfile/init.ora.9202012152743';

    shutdown immediate;

    startup nomount;

    show parameter spfile
    show parameter db_name

    alter database mount;
    alter database open;
     
     
       
    14#
     
     发表于 2013-2-26 13:02:10
    1. SQL> startup mount pfile='/opt/app/oracle/admin/zxdb/pfile/init.ora.9202012152743';
    2. ORACLE instance started.
    3. Total System Global Area 3724607488 bytes
    4. Fixed Size                  2233880 bytes
    5. Variable Size             805308904 bytes
    6. Database Buffers         2902458368 bytes
    7. Redo Buffers               14606336 bytes
    8. Database mounted.
    9. SQL> alter database open;
    10. Database altered.
    11. SQL> create spfile='+data/zxdb/spfilezxdb.ora' from pfile;
    12. File created.
    13. SQL> shutdown immediate;
    14. Database closed.
    15. Database dismounted.
    16. ORACLE instance shut down.
    17. SQL> startup nomount;
    18. ORA-01506: missing or illegal database name
    19. SQL>
    复制代码
     
     
       
    15#
     
     发表于 2013-2-26 13:13:05
    命令都给你写好了, 为什么不严格执行action plan !!!!!!!!!!!!!!!!!!!!!!
     
     
       
    16#
     
     发表于 2013-2-26 13:25:06
    1. SQL> conn /as sysdba
    2. Connected to an idle instance.
    3. SQL> startup mount pfile='/opt/app/oracle/admin/zxdb/pfile/init.ora.9202012152743';
    4. ORACLE instance started.
    5. Total System Global Area 3724607488 bytes
    6. Fixed Size                  2233880 bytes
    7. Variable Size             805308904 bytes
    8. Database Buffers         2902458368 bytes
    9. Redo Buffers               14606336 bytes
    10. Database mounted.
    11. SQL> alter database open;
    12. Database altered.
    13. SQL> create spfile='+data/zxdb/spfilezxdb.ora' from pfile='/opt/app/oracle/admin/zxdb/pfile/init.ora.9202012152743';
    14. File created.
    15. SQL> shutdown immediate;
    16. Database closed.
    17. Database dismounted.
    18. ORACLE instance shut down.
    19. SQL> startup nomount;
    20. ORACLE instance started.
    21. Total System Global Area 3724607488 bytes
    22. Fixed Size                  2233880 bytes
    23. Variable Size             805308904 bytes
    24. Database Buffers         2902458368 bytes
    25. Redo Buffers               14606336 bytes
    26. SQL> show parameter spfile
    27. NAME                                 TYPE
    28. ------------------------------------ ----------------------
    29. VALUE
    30. ------------------------------
    31. spfile                               string
    32. +DATA/zxdb/spfilezxdb.ora
    33. SQL> show parameter db_name
    34. NAME                                 TYPE
    35. ------------------------------------ ----------------------
    36. VALUE
    37. ------------------------------
    38. db_name                              string
    39. zxdb
    40. SQL> alter database mount;
    41. Database altered.
    42. SQL> alter database open;
    43. Database altered.
    44. SQL>
    复制代码
     
     
       
    17#
     
     发表于 2013-2-26 13:32:44
    感谢maclean

    在create spfile的时候 pfle也要指定路径的

    这是为什么呢?
     
     
       
    18#
     
     发表于 2013-2-27 17:42:20
    不指定 pfile 位置的情况 用的是下面这个, 看文件大小是基本空的

    -rw-r--r-- 1 oracle oinstall   58 Dec 28 18:16 initzxdb1.ora
  • 相关阅读:
    swing如何让控件在窗口打开时,自动获得焦点
    获取list集合中重复的元素
    IDEA安装流程(IDEA安装步骤)
    tmux切换页,鼠标滚动
    prefix
    python换行
    安装pytorch方法,直接上官网!
    解压tar.gz文件
    安装boost
    pytorch将其他类型转为tensor torch.as_tensor()、torch.from_numpy()
  • 原文地址:https://www.cnblogs.com/weixun/p/3105873.html
Copyright © 2020-2023  润新知