oracle 11.2 RAC 系列-安装新主机,识别老存储-1-识别ASM磁盘

在有些场景下,RAC环境中如果主机出现问题,比如硬件故障等,不能启动,我们需要尽快存储上的启动数据库,恢复业务,那么就需要迁移以前的RAC环境到新的主机环境下,我测试了11.2和12.1的RAC,恢复过程还是很快的,基本上就是安装软件的过程,如果真实场景恢复业务,有两种方法:
1,按照我这里的方法重新安装主机,恢复RAC和数据库
2,如果之前有可用的操作系统的备份(比如NBU备份了OS),那么直接使用NBU还原即可
.
我这里测试的是方法1,重新安装11204的GI(Grid Infrastructure)和ORACLE RDBMS软件,然后识别老存储。
测试环境:单节点RAC, 操作系统是OEL Linux 6.6, 数据库版本是11.2.0.4

首先,因为存储使用的是11204的ASM,测试过程只安装11204的GI(Grid Infrastructure)软件,不用OUI配置GI。
[root@lunar5 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
 
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@lunar5 ~]#
执行root.sh:
[root@lunar5 ~]# /u01/app/11.2.0.4/grid/root.sh
Performing root user operation for Oracle 11g
 
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0.4/grid
 
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
 
 
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
 
Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
  root wallet
  root wallet cert
  root cert export
  peer wallet
  profile reader wallet
  pa wallet
  peer wallet keys
  pa wallet keys
  peer cert request
  pa cert request
  peer cert
  pa cert
  peer root cert TP
  profile reader root cert TP
  pa root cert TP
  peer pa cert TP
  pa peer cert TP
  profile reader pa cert TP
  profile reader peer cert TP
  peer user cert
  pa user cert
Adding Clusterware entries to upstart
CRS-2672: Attempting to start 'ora.mdnsd' on 'lunar5'
CRS-2676: Start of 'ora.mdnsd' on 'lunar5' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'lunar5'
CRS-2676: Start of 'ora.gpnpd' on 'lunar5' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'lunar5'
CRS-2672: Attempting to start 'ora.gipcd' on 'lunar5'
CRS-2676: Start of 'ora.cssdmonitor' on 'lunar5' succeeded
CRS-2676: Start of 'ora.gipcd' on 'lunar5' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'lunar5'
CRS-2672: Attempting to start 'ora.diskmon' on 'lunar5'
CRS-2676: Start of 'ora.diskmon' on 'lunar5' succeeded
CRS-2676: Start of 'ora.cssd' on 'lunar5' succeeded
 
ASM created and started successfully.
 
Disk Group TEMPDG created successfully.
 
clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk 381226346c054f62bf5f219ee16d7e25.
Successfully replaced voting disk group with +TEMPDG.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   381226346c054f62bf5f219ee16d7e25 (/dev/asm-diski) [TEMPDG]
Located 1 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'lunar5'
CRS-2676: Start of 'ora.asm' on 'lunar5' succeeded
CRS-2672: Attempting to start 'ora.TEMPDG.dg' on 'lunar5'
CRS-2676: Start of 'ora.TEMPDG.dg' on 'lunar5' succeeded
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
[root@lunar5 ~]#
相应的checkpoint文件内容:
[root@lunar5 ~]# ll /u01/app/grid/Clusterware/ckptGridHA_lunar5.xml
-rw-r--r-- 1 grid oinstall 4176 Feb 15 19:31 /u01/app/grid/Clusterware/ckptGridHA_lunar5.xml
[root@lunar5 ~]#
[root@lunar5 ~]# tail  /u01/app/grid/Clusterware/ckptGridHA_lunar5.xml
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_OSDSETUP" DESC="ROOTCRS_OSDSETUP" STATE="SUCCESS"/>
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_ONETIME" DESC="ROOTCRS_ONETIME" STATE="SUCCESS"/>
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_OLR" DESC="ROOTCRS_OLR" STATE="SUCCESS"/>
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_GPNPSETUP" DESC="ROOTCRS_GPNPSETUP" STATE="SUCCESS"/>
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_OHASD" DESC="ROOTCRS_OHASD" STATE="SUCCESS"/>
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_INITRES" DESC="ROOTCRS_INITRES" STATE="SUCCESS"/>
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_ACFSINST" DESC="ROOTCRS_ACFSINST" STATE="SUCCESS"/>
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_BOOTCFG" DESC="ROOTCRS_BOOTCFG" STATE="SUCCESS"/>
   <CHECKPOINT LEVEL="MAJOR" NAME="ROOTCRS_NODECONFIG" DESC="ROOTCRS_NODECONFIG" STATE="SUCCESS"/>
</CHECKPOINTS>
[root@lunar5 ~]#
这里看到“DESC=”ROOTCRS_NODECONFIG” STATE=”SUCCESS””表示GI已经配置完成。
图形界面点击ok,继续执行其余配置,配置完成后,再次检查checkpoint文件:
[root@lunar5 ~]# ll  /u01/app/grid/Clusterware/ckptGridHA_lunar5.xml
-rw-r--r-- 1 grid oinstall 4176 Feb 15 19:31 /u01/app/grid/Clusterware/ckptGridHA_lunar5.xml
[root@lunar5 ~]# cd /u01/app/grid/Clusterware/
[root@lunar5 Clusterware]# ll
total 8
-rw-r--r-- 1 grid oinstall 4176 Feb 15 19:31 ckptGridHA_lunar5.xml
[root@lunar5 Clusterware]#
这里看到,checkpoint文件的日期没有变化,说明checkpoint文件是执行root.sh的时候才有用的,也就是这个过程是11.2中为了方便客户,增加了root.sh的失败后继续配置二设计的,非常体贴的功能。在12.2中,该功能更加方便,他将会只管的告诉你当前配置的检查点情况,如果有些步骤失败后,oracle会自动清除老的配置,以便可以失败安装后不用重装,而是纠正错误后继续配置,类似“断点续传”那种意思。
.
比如,下面是12.2beta上安装RAC时执行root.sh的过程:
[root@lunar1 ~]#  /stage/root.sh
Performing root user operation.
 
The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /stage
 
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
 
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
 
Using configuration parameter file: /stage/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/lunar1/crsconfig/rootcrs_lunar1_2016-01-24_12-44-34AM.log
2016/01/24 12:44:34 CLSRSC-46: Error: '/stage/crs/install/ParentDirPerm_lunar1.txt' does not exist
 
2016/01/24 12:44:34 CLSRSC-46: Error: '/stage/crs/install/ParentDirPerm_lunar1.txt' does not exist
 
2016/01/24 12:44:35 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
 
2016/01/24 12:44:35 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector.
 
2016/01/24 12:44:35 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
 
2016/01/24 12:44:35 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
 
2016/01/24 12:44:37 CLSRSC-363: User ignored prerequisites during installation
 
2016/01/24 12:44:37 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
 
2016/01/24 12:44:38 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
 
2016/01/24 12:44:39 CLSRSC-594: Executing installation step 5 of 19: 'SaveParamFile'.
 
2016/01/24 12:44:40 CLSRSC-594: Executing installation step 6 of 19: 'SetupOSD'.
 
2016/01/24 12:44:41 CLSRSC-594: Executing installation step 7 of 19: 'CheckCRSConfig'.
 
2016/01/24 12:44:41 CLSRSC-594: Executing installation step 8 of 19: 'SetupLocalGPNP'.
 
2016/01/24 12:44:42 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
 
2016/01/24 12:44:43 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
 
2016/01/24 12:45:30 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
 
2016/01/24 12:45:31 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
 
2016/01/24 12:45:46 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
 
2016/01/24 12:46:08 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
 
2016/01/24 12:46:11 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
 
2016/01/24 12:46:11 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
 
2016/01/24 12:46:14 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
 
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'lunar1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'lunar1'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'lunar1'
CRS-2677: Stop of 'ora.mdnsd' on 'lunar1' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'lunar1' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'lunar1'
CRS-2677: Stop of 'ora.evmd' on 'lunar1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'lunar1'
CRS-2677: Stop of 'ora.gipcd' on 'lunar1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'lunar1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2016/01/24 12:46:23 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
 
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'lunar1'
CRS-2672: Attempting to start 'ora.evmd' on 'lunar1'
CRS-2676: Start of 'ora.mdnsd' on 'lunar1' succeeded
CRS-2676: Start of 'ora.evmd' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'lunar1'
CRS-2676: Start of 'ora.gpnpd' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'lunar1'
CRS-2676: Start of 'ora.gipcd' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'lunar1'
CRS-2676: Start of 'ora.cssdmonitor' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'lunar1'
CRS-2672: Attempting to start 'ora.diskmon' on 'lunar1'
CRS-2676: Start of 'ora.diskmon' on 'lunar1' succeeded
CRS-2676: Start of 'ora.cssd' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'lunar1'
CRS-2672: Attempting to start 'ora.ctssd' on 'lunar1'
CRS-2676: Start of 'ora.ctssd' on 'lunar1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'lunar1'
CRS-2676: Start of 'ora.asm' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'lunar1'
CRS-2676: Start of 'ora.storage' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'lunar1'
CRS-2676: Start of 'ora.crf' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'lunar1'
CRS-2676: Start of 'ora.crsd' on 'lunar1' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-6017: Processing resource auto-start for servers: lunar1
CRS-6016: Resource auto-start has completed for server lunar1
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
2016/01/24 12:47:34 CLSRSC-343: Successfully started Oracle Clusterware stack
 
2016/01/24 12:47:34 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
 
CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'lunar1'
CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'lunar1'
CRS-2676: Start of 'ora.asm' on 'lunar1' succeeded
CRS-2672: Attempting to start 'ora.CRSDG.dg' on 'lunar1'
CRS-2676: Start of 'ora.CRSDG.dg' on 'lunar1' succeeded
2016/01/24 12:48:43 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
 
2016/01/24 12:49:04 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
 
[root@lunar1 ~]#
可以看到,这个过程比12.2以前的RAC执行root.sh的提示更加清晰了。
好吧,回到我们的环境中,继续检查老的asm磁盘组
[grid@lunar5 ~]$ kfod disks=all ds=true cluster=true status=true
--------------------------------------------------------------------------------
 Disk          Size Header    Path                                     Disk Group   User     Group  
================================================================================
   1:        512 Mb MEMBER    /dev/asm-diskb                           DATADG1      grid     asmadmin
   2:        512 Mb MEMBER    /dev/asm-diskc                           DATADG1      grid     asmadmin
   3:        512 Mb MEMBER    /dev/asm-diskd                           DATADG1      grid     asmadmin
   4:       1024 Mb MEMBER    /dev/asm-diske                           CRSDG        grid     asmadmin
   5:       1024 Mb MEMBER    /dev/asm-diskf                           CRSDG        grid     asmadmin
   6:       1024 Mb MEMBER    /dev/asm-diskg                           CRSDG        grid     asmadmin
   7:       5120 Mb MEMBER    /dev/asm-diskh                           DATADG2      grid     asmadmin
   8:       3072 Mb MEMBER    /dev/asm-diski                           TEMPDG       grid     asmadmin
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME                                      HOST_NAME          
================================================================================
     +ASM1 /u01/app/11.2.0.4/grid                           lunar5             
[grid@lunar5 ~]$
将上述磁盘组添加到ASM启动磁盘组的列表中:
[grid@lunar5 ~]$ ss
 
SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 21:31:29 2016
 
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
 
SQL> show parameter asm
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string
asm_diskstring                       string      /dev/asm*
asm_power_limit                      integer     1
asm_preferred_read_failure_groups    string
SQL> alter system set asm_diskgroups='TEMPDG','CRSDG', 'DATADG1', 'DATADG2' scope=both;
 
System altered.
 
SQL>
对新添加的磁盘组执行mount和dismount后,这些磁盘组就会自动添加到ocr中:
[root@lunar5 ~]# crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRSDG.dg
               ONLINE  ONLINE       lunar5                                      
ora.DATADG1.dg
               ONLINE  ONLINE       lunar5                                      
ora.DATADG2.dg
               ONLINE  ONLINE       lunar5                                      
ora.LISTENER.lsnr
               ONLINE  ONLINE       lunar5                                      
ora.TEMPDG.dg
               ONLINE  ONLINE       lunar5                                      
ora.asm
               ONLINE  ONLINE       lunar5                   Started            
ora.gsd
               OFFLINE OFFLINE      lunar5                                      
ora.net1.network
               ONLINE  ONLINE       lunar5                                      
ora.ons
               ONLINE  ONLINE       lunar5                                      
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       lunar5                                      
ora.cvu
      1        ONLINE  ONLINE       lunar5                                      
ora.lunar5.vip
      1        ONLINE  ONLINE       lunar5                                      
ora.oc4j
      1        ONLINE  ONLINE       lunar5                                      
ora.scan1.vip
      1        ONLINE  ONLINE       lunar5                                      
[root@lunar5 ~]#
检查ASM磁盘组中的内容(比如包含哪些数据库),因为ASM是采用OMF的,因此大部分情况下,通过磁盘组的目录结构就可以看出来这个存储中以前包含哪些数据库和其他相关信息:
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512   4096  1048576      3072     2769             1024             872              0             N  CRSDG/
MOUNTED  NORMAL  N         512   4096  1048576      1536     1251              512             369              0             N  DATADG1/
MOUNTED  EXTERN  N         512   4096  1048576      5120     3386                0            3386              0             N  DATADG2/
MOUNTED  EXTERN  N         512   4096  1048576      3072     2719                0            2719              0             Y  TEMPDG/
ASMCMD> cd +crsdg
ASMCMD> ls
ASMCMD> cd +datadg1
ASMCMD> ls
ASMCMD> cd +datadg2
ASMCMD> ls
LUNAR/
ASMCMD>
这里看到,该存储中,包含了一个数据库,crsdg中的信息已经被我删除了,因此,没有老的ocr和voting disk文件了
现在,已经确定只有datadg2上面有数据,因此可以重组磁盘组,以便合理利用空间(后续我要用这个vm做很多其他测试):
ASMCMD> lsdg
State    Type    Rebal  Sector  Block       AU  Total_MB  Free_MB  Req_mir_free_MB  Usable_file_MB  Offline_disks  Voting_files  Name
MOUNTED  NORMAL  N         512   4096  4194304      1536     1296              512             392              0             N  DATADG1/
MOUNTED  EXTERN  N         512   4096  1048576      5120     3386                0            3386              0             N  DATADG2/
MOUNTED  EXTERN  N         512   4096  1048576      3072     3016                0            3016              0             N  DATADG3/
MOUNTED  EXTERN  N         512   4096  1048576      3072     2719                0            2719              0             Y  TEMPDG/
ASMCMD>
使用kfod查看:
[grid@lunar5 ~]$ kfod disks=all ds=true cluster=true status=true
--------------------------------------------------------------------------------
 Disk          Size Header    Path                                     Disk Group   User     Group  
================================================================================
   1:        512 Mb MEMBER    /dev/asm-diskb                           DATADG1      grid     asmadmin
   2:        512 Mb MEMBER    /dev/asm-diskc                           DATADG1      grid     asmadmin
   3:        512 Mb MEMBER    /dev/asm-diskd                           DATADG1      grid     asmadmin
   4:       1024 Mb MEMBER    /dev/asm-diske                           DATADG3      grid     asmadmin
   5:       1024 Mb MEMBER    /dev/asm-diskf                           DATADG3      grid     asmadmin
   6:       1024 Mb MEMBER    /dev/asm-diskg                           DATADG3      grid     asmadmin
   7:       5120 Mb MEMBER    /dev/asm-diskh                           DATADG2      grid     asmadmin
   8:       3072 Mb MEMBER    /dev/asm-diski                           TEMPDG       grid     asmadmin
--------------------------------------------------------------------------------
ORACLE_SID ORACLE_HOME                                      HOST_NAME          
================================================================================
     +ASM1 /u01/app/11.2.0.4/grid                           lunar5             
[grid@lunar5 ~]$
确认当前的crs状态都是正常的:
[root@lunar5 ~]# crsctl status res -t
——————————————————————————–
NAME TARGET STATE SERVER STATE_DETAILS
——————————————————————————–
Local Resources
——————————————————————————–
ora.DATADG1.dg
ONLINE ONLINE lunar5
ora.DATADG2.dg
ONLINE ONLINE lunar5
ora.DATADG3.dg
ONLINE ONLINE lunar5
ora.LISTENER.lsnr
ONLINE ONLINE lunar5
ora.TEMPDG.dg
ONLINE ONLINE lunar5
ora.asm
ONLINE ONLINE lunar5 Started
ora.gsd
OFFLINE OFFLINE lunar5
ora.net1.network
ONLINE ONLINE lunar5
ora.ons
ONLINE ONLINE lunar5
——————————————————————————–
Cluster Resources
——————————————————————————–
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE lunar5
ora.cvu
1 ONLINE ONLINE lunar5
ora.lunar5.vip
1 ONLINE ONLINE lunar5
ora.oc4j
1 ONLINE ONLINE lunar5
ora.scan1.vip
1 ONLINE ONLINE lunar5
[root@lunar5 ~]#
至此老存储的ASM磁盘组已经在新的主机上可以识别了。

时间: 2024-10-02 11:28:22

oracle 11.2 RAC 系列-安装新主机,识别老存储-1-识别ASM磁盘的相关文章

oracle 11.2 RAC 系列安装新主机,识别老存储-2-准备识别数据库

假设原来的主机已经完全不能启动了(比如硬件故障等),只能在存储上的ASM中查找数据库使用的参数文件: [grid@lunar5 ~]$ ss   SQL*Plus: Release 11.2.0.4.0 Production on Mon Feb 15 21:48:15 2016   Copyright (c) 1982, 2013, Oracle.  All rights reserved.     Connected to: Oracle Database 11g Enterprise Ed

oracle中11.2 RAC安装新主机,识别老存储-3-配置老存储的数据库

安装Oracle 11.2.0.4数据库软件,然后执行root.sh,这个没有特别的东西,略. 之后,我们需要修改ORACLE RDBMS的oracle二进制文件的权限,让oracle 数据库进程可以获取ASM磁盘组. [root@lunar5 ~]# su - grid [grid@lunar5 ~]$ $ORACLE_HOME/bin/setasmgidwrap o=/u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle [grid@luna

ORACLE 11.2 RAC修改数据库静态参数

操作系统:HP UNIX 11.31 数据库:oracle 11.2 rac 今天对一套ORACLE 11.2 RAC数据库进行参数调整,修改db_files为3000,系统默认为200.顺便修改了操作系统的内核参数:fs_async,服务器也需要重启. 操作计划: 1.参数在两个节点都修改完毕,不重启机器和数据. 2.先重启节点1,节点2先不动,等节点1起来之后,再重启节点2. 故障: 可是在节点1启动之后,实例怎么都起不来,然后手工用srvctl启动实例报错: racdb1:/home/gr

VirtualBox+Oracle 11g R2 RAC的安装总结

昨天参照Oracle Base上的文档在VirtualBox虚拟机上完成Oracle 11G R2 RAC的安装和调试,安装文档已经很详细了,但是自己是第一次在OEL上安装RAC还是遇到不少波折,现在把一些主要的问题和解决方案记录下来以供后人参考. 第一是内存问题,最低要求是每台虚拟机1.5GB的内存,由于机器内存有限没办法,刚开始只给1GB想忽悠过去,结果安装Grid Control时等好几个小时都搞不定,只好取消重新分配1.5GB给RAC1,1.2GB给RAC2,最后勉强安装完成,但操作响应

Oracle 12.1 RAC安装新主机,识别老存储和恢复数据库例子

具体步骤如下(因为先在12.1中测试,然后才在112.测试,因此这里的测试记录了发现的一些问题和处理方法,而11.2中模拟主机损坏,直接使用了这里的经验,因此没有任何报错信息): 1,安装12.1.0.2的GI软件,如果需要也apply最新的PSU,然后查看磁盘和磁盘组: [grid@lunarrac ~]$ kfod disks=all ds=true cluster=true status=true ----------------------------------------------

Oracle 11.2 RAC环境中CRSD进程简介

在11.2中,CRSD进程不再是RAC中最关键的进程之一. 如果对10g RAC比较熟悉,应该清楚CRSD进程的重要性,Oracle在操作系统启动后,就是通过启动这个进程然后启动整个CLUSTER以及数据库的. 在11.2的RAC中,Oracle调整了ASM,使得OCR和VOT可以存储在ASM磁盘组中.ASM是CLUSTER所支持的一个组件,而CLUSTER启动所需的OCR和VOT却要放在ASM中,这其实要解决一个先有鸡还是先有蛋的问题.最终Oracle通过OHASD进程的方式解决了这个问题,而

Oracle 11.2 RAC自动启动报错诊断

一个客户的11.2 RAC for Linux X86-64环境停电后出现了故障,RAC环境无法自动启动. 登录数据库服务器后,发现CLUSTER进程存在,于是尝试手工启动数据库: $ sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Sun May 29 20:17:16 2011 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to a

Oracle 11.2 RAC的时间同步异常

一个客户的11.2的RAC环境,出现了一个节点DOWN掉的问题. 这个客户手工调整了系统的时间,使得两个节点的系统时间只相差几秒,而且还设置了11.2的自动时间同步功能.但是到了下午发现一个节点上的实例DOWN掉了,而且这时两个节点的时间相差了一个小时左右. 检查挂掉的节点上的数据库alert文件: Mon May 10 15:22:03 2010 NOTE: ASMB terminating Errors in file /oracle/app/oracle/diag/rdbms/posp/p

Oracle 11g R2 RAC高可用连接特性 – SCAN详解2

SCAN概念 先介绍一下什么叫SCAN,SCAN(Single Client Access Name)是Oracle从11g R2开始推出的,客户端可以通过SCAN特性负载均衡地连接到RAC数据库.SCAN提供一个域名来访问RAC,域名可以解析1个到3个(注意,最多3个)SCAN IP,我们可以通过DNS或者GNS来解析实现.其中DNS大家都很熟悉,这里不多说.GNS(Grid Naming Service)则是Oracle 11g R2的新功能,可以通过DHCP服务为节点和SCAN分配VIP和