1. 程式人生 > >ASM磁碟組異機遷移

ASM磁碟組異機遷移

環境:
Source:
OS:redhat 6.3
DB:Oralce RAC 11.2.4.0




destination:
OS:redhat 6.3
DB:Oralce RAC 11.2.4.0




背景:客戶的PC機上面有兩個例項,壓力太大,需要遷移出一個例項。資料量TB級別,因為同平臺,同版本,外掛儲存。所以這裡採用直接遷移asm磁碟組
操作前需要注意的:
1、Voting Disk是單獨的盤,不包含需要遷移的資料

話不多,這裡模擬出來分享給大家(PS:我的原庫和目標庫的主機名是一樣的,第三步後全是在目標庫上面操作的):
還是老規矩,整體步驟:
1、建立資料庫和ASM例項的pfile
2、dismount  需要遷移的磁碟組
3、異機安裝相同環境的RAC
4、掛載ZBDBA包含的磁碟並且對映到機器上
5、修改ASM引數檔案
6、啟動ASM例項
7、建立資料庫引數檔案
8、啟動資料庫
9、將例項加入到crs資源中

需要遷移的磁碟組:

SQL>  select name,path from v$asm_disk where group_number=(select group_number from v$asm_diskgroup where name='ZBDBA');

NAME                           PATH
------------------------------ ------------------------------
ZBDBA_0001                     /dev/asm-diskf
ZBDBA_0000                     /dev/asm-diske


SQL> select name from v$dbfile;

NAME
--------------------------------------------------------------------------------
+ZBDBA/test/datafile/users.259.870904095
+ZBDBA/test/datafile/undotbs1.258.870904095
+ZBDBA/test/datafile/sysaux.257.870904095
+ZBDBA/test/datafile/system.256.870904095
+ZBDBA/test/datafile/undotbs2.267.870904553
+ZBDBA/test/datafile/zbdba.273.870905233

conn zbdba/oracle;
SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
HUIHUI                         TABLE
XIONGGE                        TABLE
ZBDBA                          TABLE

1、建立資料庫和ASM例項的pfile
create pfile from spfile;

[[email protected] dbs]$ more init+ASM1.ora
+ASM1.asm_diskgroups='ZBDBA'#Manual Mount
+ASM2.asm_diskgroups='ZBDBA'#Manual Mount
*.asm_diskstring='/dev/asm*'
*.asm_power_limit=1
*.diagnostic_dest='/opt/ogrid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'


[
[email protected]
dbs]$ cat inittest1.ora test1.__db_cache_size=264241152 test2.__db_cache_size=264241152 test1.__java_pool_size=4194304 test2.__java_pool_size=4194304 test1.__large_pool_size=8388608 test2.__large_pool_size=8388608 test1.__pga_aggregate_target=318767104 test2.__pga_aggregate_target=318767104 test1.__sga_target=469762048 test2.__sga_target=469762048 test1.__shared_io_pool_size=0 test2.__shared_io_pool_size=0 test1.__shared_pool_size=184549376 test2.__shared_pool_size=184549376 test1.__streams_pool_size=0 test2.__streams_pool_size=0 *.audit_file_dest='/opt/oracle/admin/test/adump' *.audit_trail='db' *.cluster_database=true *.compatible='11.2.0.4.0' *.control_files='+ZBDBA/test/controlfile/current.261.870904273','+ZBDBA/test/controlfile/current.260.870904273' *.db_block_size=8192 *.db_create_file_dest='+ZBDBA' *.db_domain='' *.db_name='test' *.db_recovery_file_dest='+ZBDBA' *.db_recovery_file_dest_size=4621074432 *.diagnostic_dest='/opt/oracle' *.dispatchers='(PROTOCOL=TCP) (SERVICE=testXDB)' test1.instance_number=1 test2.instance_number=2 *.memory_target=786432000 *.open_cursors=300 *.processes=150 *.remote_listener='node-cluster-scan:1521' *.remote_login_passwordfile='exclusive' test2.thread=2 test1.thread=1 test2.undo_tablespace='UNDOTBS2' test1.undo_tablespace='UNDOTBS1'

2、dismount  需要遷移的磁碟組
alter diskgroup zbdba dismount;


3、異機安裝相同環境的RAC
這裡就不演示了。前面文章有,可以參照。

4、掛載ZBDBA包含的磁碟並且對映到機器上

for i in b c d e f;
do
echo "KERNEL==\"sd*\", BUS==\"scsi\", PROGRAM==\"/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\", RESULT==\"`/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", NAME=\"asm-disk$i\", OWNER=\"grid\", GROUP=\"asmadmin\", MODE=\"0660\""      >> /etc/udev/rules.d/99-oracle-asmdevices.rules
done
start_udev


[[email protected] ~]# ls /dev/asm*
/dev/asm-diskb  /dev/asm-diskc  /dev/asm-diskd  /dev/asm-diske  /dev/asm-diskf

[[email protected] ~]# ls /dev/asm*
/dev/asm-diskb  /dev/asm-diskc  /dev/asm-diskd  /dev/asm-diske  /dev/asm-diskf
磁碟對映與原庫一樣的名字了。






檢視磁碟組:
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      6144     5218             2048            1585              0             Y  DATA/
ASMCMD>


5、修改ASM引數檔案
[[email protected] dbs]$ more init+ASM1.ora
*.asm_diskstring='/dev/asm*'
*.asm_power_limit=1
*.diagnostic_dest='/opt/ogrid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
改為:
[[email protected] dbs]$ more init+ASM1.ora 
+ASM1.asm_diskgroups='ZBDBA'#Manual Mount
+ASM2.asm_diskgroups='ZBDBA'#Manual Mount
*.asm_diskstring='/dev/asm*'
*.asm_power_limit=1
*.diagnostic_dest='/opt/ogrid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'
 
[[email protected] dbs]$ pwd
/opt/grid/products/11.2.0/dbs
SQL> startup pfile='init+ASM1.ora'
ASM instance started

Total System Global Area 1135747072 bytes
Fixed Size                  2260728 bytes
Variable Size            1108320520 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled
檢視啟動日誌:
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options.
ORACLE_HOME = /opt/grid/products/11.2.0
System name:    Linux
Node name:      zbdba1
Release:        2.6.32-279.el6.x86_64
Version:        #1 SMP Wed Jun 13 18:24:36 EDT 2012
Machine:        x86_64
Using parameter settings in server-side spfile +DATA/node-cluster/asmparameterfile/registry.253.871094907
System parameters with non-default values:
  large_pool_size          = 12M
  instance_type            = "asm"
  remote_login_passwordfile= "EXCLUSIVE"
  asm_diskstring           = "/dev/asm*"
  asm_diskgroups           = "ZBDBA"
  asm_power_limit          = 1
  diagnostic_dest          = "/opt/ogrid"
Cluster communication is configured to use the following interface(s) for this instance
  169.254.126.87
cluster interconnect IPC version:Oracle UDP/IP (generic)
IPC Vendor 1 proto 2
Sun Feb 08 02:49:44 2015
PMON started with pid=2, OS id=11140
Sun Feb 08 02:49:44 2015
PSP0 started with pid=3, OS id=11143
Sun Feb 08 02:49:45 2015
VKTM started with pid=4, OS id=11156 at elevated priority
VKTM running at (1)millisec precision with DBRM quantum (100)ms
Sun Feb 08 02:49:45 2015
GEN0 started with pid=5, OS id=11160
Sun Feb 08 02:49:45 2015
DIAG started with pid=6, OS id=11162
Sun Feb 08 02:49:45 2015
PING started with pid=7, OS id=11164
Sun Feb 08 02:49:45 2015
DIA0 started with pid=8, OS id=11166
Sun Feb 08 02:49:45 2015
LMON started with pid=9, OS id=11168
Sun Feb 08 02:49:45 2015
LMD0 started with pid=10, OS id=11170
* Load Monitor used for high load check
* New Low - High Load Threshold Range = [960 - 1280]
Sun Feb 08 02:49:45 2015
LMS0 started with pid=11, OS id=11172 at elevated priority
Sun Feb 08 02:49:45 2015
LMHB started with pid=12, OS id=11176
Sun Feb 08 02:49:45 2015
MMAN started with pid=13, OS id=11178
Sun Feb 08 02:49:45 2015
DBW0 started with pid=14, OS id=11180
Sun Feb 08 02:49:45 2015
LGWR started with pid=15, OS id=11182
Sun Feb 08 02:49:45 2015
CKPT started with pid=16, OS id=11184
Sun Feb 08 02:49:45 2015
SMON started with pid=17, OS id=11186
Sun Feb 08 02:49:45 2015
RBAL started with pid=18, OS id=11188
Sun Feb 08 02:49:45 2015
GMON started with pid=19, OS id=11190
Sun Feb 08 02:49:45 2015
MMON started with pid=20, OS id=11192
Sun Feb 08 02:49:45 2015
MMNL started with pid=21, OS id=11194
lmon registered with NM - instance number 1 (internal mem no 0)
Reconfiguration started (old inc 0, new inc 2)
ASM instance
List of instances:
1 (myinst: 1)
Global Resource Directory frozen
* allocate domain 0, invalid = TRUE
Communication channels reestablished
Master broadcasted resource hash value bitmaps
Non-local Process blocks cleaned out
LMS 0: 0 GCS shadows cancelled, 0 closed, 0 Xw survived
Set master node info
Submitted all remote-enqueue requests
Dwn-cvts replayed, VALBLKs dubious
All grantable enqueues granted
Post SMON to start 1st pass IR
Submitted all GCS remote-cache requests
Post SMON to start 1st pass IR
Fix write in gcs resources
Reconfiguration complete
Sun Feb 08 02:49:45 2015
LCK0 started with pid=22, OS id=11196
ORACLE_BASE from environment = /opt/ogrid
Sun Feb 08 02:49:46 2015
SQL> ALTER DISKGROUP ALL MOUNT
NOTE: Diskgroups listed in ASM_DISKGROUPS are
         ZBDBA
NOTE: Diskgroup used for Voting files is:
         DATA
Diskgroup with spfile:DATA
Diskgroup used for OCR is:DATA
NOTE: cache registered group DATA number=1 incarn=0x265b8136
NOTE: cache began mount (first) of group DATA number=1 incarn=0x265b8136
NOTE: cache registered group ZBDBA number=2 incarn=0x266b8137
NOTE: cache began mount (first) of group ZBDBA number=2 incarn=0x266b8137
NOTE: Assigning number (1,2) to disk (/dev/asm-diskd)
NOTE: Assigning number (1,1) to disk (/dev/asm-diskc)
NOTE: Assigning number (1,0) to disk (/dev/asm-diskb)
NOTE: Assigning number (2,0) to disk (/dev/asm-diske)
NOTE: Assigning number (2,1) to disk (/dev/asm-diskf)
NOTE: GMON heartbeating for grp 1
GMON querying group 1 at 4 for pid 23, osid 11200
NOTE: cache opening disk 0 of grp 1: DATA_0000 path:/dev/asm-diskb
NOTE: F1X0 found on disk 0 au 2 fcn 0.580
NOTE: cache opening disk 1 of grp 1: DATA_0001 path:/dev/asm-diskc
NOTE: F1X0 found on disk 1 au 2 fcn 0.602
NOTE: cache opening disk 2 of grp 1: DATA_0002 path:/dev/asm-diskd
NOTE: F1X0 found on disk 2 au 2 fcn 0.602
NOTE: cache mounting (first) normal redundancy group 1/0x265B8136 (DATA)
* allocate domain 1, invalid = TRUE
NOTE: attached to recovery domain 1
NOTE: starting recovery of thread=1 ckpt=7.90 group=1 (DATA)
NOTE: advancing ckpt for group 1 (DATA) thread=1 ckpt=7.90
NOTE: cache recovered group 1 to fcn 0.622
NOTE: redo buffer size is 256 blocks (1053184 bytes)
NOTE: LGWR attempting to mount thread 1 for diskgroup 1 (DATA)
Process LGWR (pid 11182) is running at high priority QoS for Exadata I/O
NOTE: LGWR found thread 1 closed at ABA 7.89
NOTE: LGWR mounted thread 1 for diskgroup 1 (DATA)
NOTE: LGWR opening thread 1 at fcn 0.622 ABA 8.90
NOTE: cache mounting group 1/0x265B8136 (DATA) succeeded
NOTE: cache ending mount (success) of group DATA number=1 incarn=0x265b8136
NOTE: GMON heartbeating for grp 2
GMON querying group 2 at 6 for pid 23, osid 11200
NOTE: cache opening disk 0 of grp 2: ZBDBA_0000 path:/dev/asm-diske
NOTE: F1X0 found on disk 0 au 2 fcn 0.67
NOTE: cache opening disk 1 of grp 2: ZBDBA_0001 path:/dev/asm-diskf
NOTE: cache mounting (first) external redundancy group 2/0x266B8137 (ZBDBA)
* allocate domain 2, invalid = TRUE
NOTE: attached to recovery domain 2
NOTE: starting recovery of thread=1 ckpt=7.284 group=2 (ZBDBA)
NOTE: advancing ckpt for group 2 (ZBDBA) thread=1 ckpt=7.284
NOTE: cache recovered group 2 to fcn 0.2892
NOTE: redo buffer size is 256 blocks (1053184 bytes)
NOTE: LGWR attempting to mount thread 1 for diskgroup 2 (ZBDBA)
NOTE: LGWR found thread 1 closed at ABA 7.283
NOTE: LGWR mounted thread 1 for diskgroup 2 (ZBDBA)
NOTE: LGWR opening thread 1 at fcn 0.2892 ABA 8.284
NOTE: cache mounting group 2/0x266B8137 (ZBDBA) succeeded
NOTE: cache ending mount (success) of group ZBDBA number=2 incarn=0x266b8137
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 1
SUCCESS: diskgroup DATA was mounted
NOTE: Instance updated compatible.asm to 10.1.0.0.0 for grp 2
SUCCESS: diskgroup ZBDBA was mounted
ORACLE_BASE value has been saved for future startups
SUCCESS: ALTER DISKGROUP ALL MOUNT
SQL> ALTER DISKGROUP ALL ENABLE VOLUME ALL
SUCCESS: ALTER DISKGROUP ALL ENABLE VOLUME ALL
NOTE: diskgroup resource ora.DATA.dg is online
NOTE: diskgroup resource ora.ZBDBA.dg is online
NOTE: Attempting voting file refresh on diskgroup DATA
NOTE: Refresh completed on diskgroup DATA
. Found 3 voting file(s).
NOTE: Voting file relocation is required in diskgroup DATA
NOTE: Attempting voting file relocation on diskgroup DATA
NOTE: Successful voting file relocation on diskgroup DATA
Sun Feb 08 02:50:00 2015
ALTER SYSTEM SET local_listener=' (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.52)(PORT=1521))))' SCOPE=MEMORY SID='+ASM1';
Sun Feb 08 02:50:01 2015
NOTE: [[email protected] (TNS V1-V3) 11280] opening OCR file
Starting background process ASMB
Sun Feb 08 02:50:01 2015
ASMB started with pid=26, OS id=11293
Sun Feb 08 02:50:01 2015
NOTE: client +ASM1:+ASM registered, osid 11295, mbr 0x0
Sun Feb 08 02:50:18 2015
Reconfiguration started (old inc 2, new inc 4)
List of instances:
1 2 (myinst: 1)
Global Resource Directory frozen
Communication channels reestablished
Master broadcasted resource hash value bitmaps
Non-local Process blocks cleaned out
Sun Feb 08 02:50:18 2015
LMS 0: 0 GCS shadows cancelled, 0 closed, 0 Xw survived
Set master node info
Submitted all remote-enqueue requests
Dwn-cvts replayed, VALBLKs dubious
All grantable enqueues granted
Submitted all GCS remote-cache requests
Fix write in gcs resources
Reconfiguration complete
檢視磁碟組狀態:
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      6144     5218             2048            1585              0             Y  DATA/
MOUNTED  EXTERN  N         512   4096  1048576     10240     8179                0            8179              0             N  ZBDBA/

建立spfile:
create spfile='+DATA' from pfile;


啟動另外一個節點ASM








7、建立資料庫引數檔案
[[email protected] dbs]$ cat inittest1.ora 
test1.__db_cache_size=264241152
test2.__db_cache_size=264241152
test1.__java_pool_size=4194304
test2.__java_pool_size=4194304
test1.__large_pool_size=8388608
test2.__large_pool_size=8388608
test1.__pga_aggregate_target=318767104
test2.__pga_aggregate_target=318767104
test1.__sga_target=469762048
test2.__sga_target=469762048
test1.__shared_io_pool_size=0
test2.__shared_io_pool_size=0
test1.__shared_pool_size=184549376
test2.__shared_pool_size=184549376
test1.__streams_pool_size=0
test2.__streams_pool_size=0
*.audit_file_dest='/opt/oracle/admin/test/adump'
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='+ZBDBA/test/controlfile/current.261.870904273','+ZBDBA/test/controlfile/current.260.870904273'
*.db_block_size=8192
*.db_create_file_dest='+ZBDBA'
*.db_domain=''
*.db_name='test'
*.db_recovery_file_dest='+ZBDBA'
*.db_recovery_file_dest_size=4621074432
*.diagnostic_dest='/opt/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=testXDB)'
test1.instance_number=1
test2.instance_number=2
*.memory_target=786432000
*.open_cursors=300
*.processes=150
*.remote_listener='node-cluster-scan:1521'
*.remote_login_passwordfile='exclusive'
test2.thread=2
test1.thread=1
test2.undo_tablespace='UNDOTBS2'
test1.undo_tablespace='UNDOTBS1'
配置環境變數:
[[email protected] ~]$ cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/products/11.2.0
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=test1
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
建立目錄:
mkdir -p /opt/oracle/admin/test/adump


8、啟動資料庫
sqlplus / as sysdba
startup




檢視日誌:
Starting up:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options.
ORACLE_HOME = /opt/oracle/products/11.2.0
System name:    Linux
Node name:      zbdba1
Release:        2.6.32-279.el6.x86_64
Version:        #1 SMP Wed Jun 13 18:24:36 EDT 2012
Machine:        x86_64
Using parameter settings in server-side pfile /opt/oracle/products/11.2.0/dbs/inittest1.ora
System parameters with non-default values:
  processes                = 150
  memory_target            = 752M
  control_files            = "+ZBDBA/test/controlfile/current.261.870904273"
  control_files            = "+ZBDBA/test/controlfile/current.260.870904273"
  db_block_size            = 8192
  compatible               = "11.2.0.4.0"
  cluster_database         = TRUE
  db_create_file_dest      = "+ZBDBA"
  db_recovery_file_dest    = "+ZBDBA"
  db_recovery_file_dest_size= 4407M
  thread                   = 1
  undo_tablespace          = "UNDOTBS1"
  instance_number          = 1
  remote_login_passwordfile= "EXCLUSIVE"
  db_domain                = ""
  dispatchers              = "(PROTOCOL=TCP) (SERVICE=testXDB)"
  remote_listener          = "node-cluster-scan:1521"
  audit_file_dest          = "/opt/oracle/admin/test/adump"
  audit_trail              = "DB"
  db_name                  = "test"
  open_cursors             = 300
  diagnostic_dest          = "/opt/oracle"
Cluster communication is configured to use the following interface(s) for this instance
  169.254.126.87
cluster interconnect IPC version:Oracle UDP/IP (generic)
IPC Vendor 1 proto 2
Sun Feb 08 03:18:08 2015
PMON started with pid=2, OS id=15720
Sun Feb 08 03:18:08 2015
PSP0 started with pid=3, OS id=15722
Sun Feb 08 03:18:09 2015
VKTM started with pid=4, OS id=15724 at elevated priority
VKTM running at (1)millisec precision with DBRM quantum (100)ms
Sun Feb 08 03:18:09 2015
GEN0 started with pid=5, OS id=15728
Sun Feb 08 03:18:09 2015
DIAG started with pid=6, OS id=15730
Sun Feb 08 03:18:09 2015
DBRM started with pid=7, OS id=15732
Sun Feb 08 03:18:09 2015
PING started with pid=8, OS id=15734
Sun Feb 08 03:18:09 2015
ACMS started with pid=9, OS id=15736
Sun Feb 08 03:18:09 2015
DIA0 started with pid=10, OS id=15738
Sun Feb 08 03:18:09 2015
LMON started with pid=11, OS id=15740
Sun Feb 08 03:18:09 2015
LMD0 started with pid=12, OS id=15742
* Load Monitor used for high load check
* New Low - High Load Threshold Range = [960 - 1280]
Sun Feb 08 03:18:09 2015
LMS0 started with pid=13, OS id=15744 at elevated priority
Sun Feb 08 03:18:09 2015
RMS0 started with pid=14, OS id=15748
Sun Feb 08 03:18:09 2015
LMHB started with pid=15, OS id=15750
Sun Feb 08 03:18:09 2015
MMAN started with pid=16, OS id=15752
Sun Feb 08 03:18:09 2015
DBW0 started with pid=17, OS id=15754
Sun Feb 08 03:18:09 2015
LGWR started with pid=18, OS id=15756
Sun Feb 08 03:18:09 2015
CKPT started with pid=19, OS id=15758
Sun Feb 08 03:18:09 2015
SMON started with pid=20, OS id=15760
Sun Feb 08 03:18:09 2015
RECO started with pid=21, OS id=15762
Sun Feb 08 03:18:09 2015
RBAL started with pid=22, OS id=15764
Sun Feb 08 03:18:09 2015
ASMB started with pid=23, OS id=15766
Sun Feb 08 03:18:09 2015
MMON started with pid=24, OS id=15768
NOTE: initiating MARK startup
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
Starting background process MARK
Sun Feb 08 03:18:09 2015
MMNL started with pid=25, OS id=15772
Sun Feb 08 03:18:09 2015
MARK started with pid=26, OS id=15774
NOTE: MARK has subscribed
starting up 1 shared server(s) ...
lmon registered with NM - instance number 1 (internal mem no 0)
Reconfiguration started (old inc 0, new inc 2)
List of instances:
1 (myinst: 1)
Global Resource Directory frozen
* allocate domain 0, invalid = TRUE
Communication channels reestablished
Master broadcasted resource hash value bitmaps
Non-local Process blocks cleaned out
LMS 0: 0 GCS shadows cancelled, 0 closed, 0 Xw survived
Set master node info
Submitted all remote-enqueue requests
Dwn-cvts replayed, VALBLKs dubious
All grantable enqueues granted
Post SMON to start 1st pass IR
Submitted all GCS remote-cache requests
Post SMON to start 1st pass IR
Fix write in gcs resources
Reconfiguration complete
Sun Feb 08 03:18:10 2015
LCK0 started with pid=30, OS id=15784
Starting background process RSMN
Sun Feb 08 03:18:10 2015
RSMN started with pid=31, OS id=15786
ORACLE_BASE from environment = /opt/oracle
Sun Feb 08 03:18:10 2015
ALTER DATABASE   MOUNT
This instance was first to mount
NOTE: Loaded library: System
SUCCESS: diskgroup ZBDBA was mounted
ERROR: failed to establish dependency between database test and diskgroup resource ora.ZBDBA.dg
Successful mount of redo thread 1, with mount id 2169243122
Database mounted in Shared Mode (CLUSTER_DATABASE=TRUE)
Lost write protection disabled
Create Relation IPS_PACKAGE_UNPACK_HISTORY
Completed: ALTER DATABASE   MOUNT
Sun Feb 08 03:18:19 2015
ALTER DATABASE OPEN
This instance was first to open
Picked broadcast on commit scheme to generate SCNs
Sun Feb 08 03:18:20 2015
Thread 1 opened at log sequence 8
  Current log# 2 seq# 8 mem# 0: +ZBDBA/test/onlinelog/group_2.264.870904281
  Current log# 2 seq# 8 mem# 1: +ZBDBA/test/onlinelog/group_2.265.870904285
Successful open of redo thread 1
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Sun Feb 08 03:18:20 2015
SMON: enabling cache recovery
Instance recovery: looking for dead threads
Instance recovery: lock domain invalid but no dead threads
[15806] Successfully onlined Undo Tablespace 2.
Undo initialization finished serial:0 start:2967074 end:2969284 diff:2210 (22 seconds)
Verifying file header compatibility for 11g tablespace encryption..
Verifying 11g file header compatibility for tablespace encryption completed
SMON: enabling tx recovery
Sun Feb 08 03:18:25 2015
minact-scn: Inst 1 is now the master inc#:2 mmon proc-id:15768 status:0x7
minact-scn status: grec-scn:0x0000.00000000 gmin-scn:0x0000.00000000 gcalc-scn:0x0000.00000000
Database Characterset is ZHS16GBK
No Resource Manager plan active
Sun Feb 08 03:18:30 2015
Starting background process GTX0
Sun Feb 08 03:18:30 2015
GTX0 started with pid=34, OS id=15838
Starting background process RCBG
Sun Feb 08 03:18:30 2015
RCBG started with pid=35, OS id=15840
replication_dependency_tracking turned off (no async multimaster replication found)
Starting background process QMNC
Sun Feb 08 03:18:36 2015
QMNC started with pid=36, OS id=15857
Sun Feb 08 03:18:53 2015
Completed: ALTER DATABASE OPEN
Sun Feb 08 03:19:01 2015
Starting background process CJQ0
Sun Feb 08 03:19:01 2015
CJQ0 started with pid=41, OS id=15920
Sun Feb 08 03:19:10 2015
Decreasing number of real time LMS from 1 to 0
Sun Feb 08 03:19:13 2015
db_recovery_file_dest_size of 4407 MB is 5.08% used. This is a
user-specified limit on the amount of space that will be used by this
database for recovery-related files, and does not reflect the amount of
space available in the underlying filesystem or ASM diskgroup.

資料庫啟動成功,檢視資料檔案:
SQL> select name from v$dbfile;

NAME
--------------------------------------------------------------------------------
+ZBDBA/test/datafile/users.259.870904095
+ZBDBA/test/datafile/undotbs1.258.870904095
+ZBDBA/test/datafile/sysaux.257.870904095
+ZBDBA/test/datafile/system.256.870904095
+ZBDBA/test/datafile/undotbs2.267.870904553
+ZBDBA/test/datafile/zbdba.273.870905233

6 rows selected.

SQL> conn zbdba/oracle;
Connected.
SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
HUIHUI                         TABLE
XIONGGE                        TABLE
ZBDBA                          TABLE
發現例項不存在crs資源中:
[[email protected] /]$ srvctl stop database -d test
PRCD-1120 : The resource for database test could not be found.
PRCR-1001 : Resource ora.test.db does not exist


[[email protected] ~]# crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    zbdba1     
ora....ER.lsnr ora....er.type ONLINE    ONLINE    zbdba1     
ora....N1.lsnr ora....er.type ONLINE    ONLINE    zbdba2     
ora.asm        ora.asm.type   ONLINE    ONLINE    zbdba1     
ora.cvu        ora.cvu.type   ONLINE    ONLINE    zbdba1     
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE              
ora....network ora....rk.type ONLINE    ONLINE    zbdba1     
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    zbdba1     
ora.ons        ora.ons.type   ONLINE    ONLINE    zbdba1     
ora....ry.acfs ora....fs.type ONLINE    ONLINE    zbdba1     
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    zbdba2     
ora....SM1.asm application    ONLINE    ONLINE    zbdba1     
ora....A1.lsnr application    ONLINE    ONLINE    zbdba1     
ora.zbdba1.gsd application    OFFLINE   OFFLINE              
ora.zbdba1.ons application    ONLINE    ONLINE    zbdba1     
ora.zbdba1.vip ora....t1.type ONLINE    ONLINE    zbdba1     
ora....SM2.asm application    ONLINE    ONLINE    zbdba2     
ora....A2.lsnr application    ONLINE    ONLINE    zbdba2     
ora.zbdba2.gsd application    OFFLINE   OFFLINE              
ora.zbdba2.ons application    ONLINE    ONLINE    zbdba2     
ora.zbdba2.vip ora....t1.type ONLINE    ONLINE    zbdba2     
9、將例項加入到crs資源中
[[email protected] dbs]$ /opt/grid/products/11.2.0/bin/srvctl add database -d test -o /opt/oracle/products/11.2.0/

[[email protected] dev]# crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    zbdba1     
ora....ER.lsnr ora....er.type ONLINE    ONLINE    zbdba1     
ora....N1.lsnr ora....er.type ONLINE    ONLINE    zbdba2     
ora.ZBDBA.dg   ora....up.type ONLINE    ONLINE    zbdba1     
ora.asm        ora.asm.type   ONLINE    ONLINE    zbdba1     
ora.cvu        ora.cvu.type   ONLINE    ONLINE    zbdba1     
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE              
ora....network ora....rk.type ONLINE    ONLINE    zbdba1     
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    zbdba1     
ora.ons        ora.ons.type   ONLINE    ONLINE    zbdba1     
ora....ry.acfs ora....fs.type ONLINE    ONLINE    zbdba1     
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    zbdba2     
ora.test.db    ora....se.type OFFLINE   OFFLINE              
ora....SM1.asm application    ONLINE    ONLINE    zbdba1     
ora....A1.lsnr application    ONLINE    ONLINE    zbdba1     
ora.zbdba1.gsd application    OFFLINE   OFFLINE              
ora.zbdba1.ons application    ONLINE    ONLINE    zbdba1     
ora.zbdba1.vip ora....t1.type ONLINE    ONLINE    zbdba1     
ora....SM2.asm application    ONLINE    ONLINE    zbdba2     
ora....A2.lsnr application    ONLINE    ONLINE    zbdba2     
ora.zbdba2.gsd application    OFFLINE   OFFLINE              
ora.zbdba2.ons application    ONLINE    ONLINE    zbdba2     
ora.zbdba2.vip ora....t1.type ONLINE    ONLINE    zbdba2      
發現例項的target是offline:
[[email protected] dev]# crs_start ora.test.db

[[email protected] dev]# crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    zbdba1     
ora....ER.lsnr ora....er.type ONLINE    ONLINE    zbdba1     
ora....N1.lsnr ora....er.type ONLINE    ONLINE    zbdba1     
ora.ZBDBA.dg   ora....up.type ONLINE    ONLINE    zbdba1     
ora.asm        ora.asm.type   ONLINE    ONLINE    zbdba1     
ora.cvu        ora.cvu.type   ONLINE    ONLINE    zbdba2     
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE              
ora....network ora....rk.type ONLINE    ONLINE    zbdba1     
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    zbdba2     
ora.ons        ora.ons.type   ONLINE    ONLINE    zbdba1     
ora....ry.acfs ora....fs.type ONLINE    ONLINE    zbdba1     
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    zbdba1     
ora.test.db    ora....se.type ONLINE    ONLINE    zbdba1     
ora....SM1.asm application    ONLINE    ONLINE    zbdba1     
ora....A1.lsnr application    ONLINE    ONLINE    zbdba1     
ora.zbdba1.gsd application    OFFLINE   OFFLINE              
ora.zbdba1.ons application    ONLINE    ONLINE    zbdba1     
ora.zbdba1.vip ora....t1.type ONLINE    ONLINE    zbdba1     
ora....SM2.asm application    ONLINE    ONLINE    zbdba2     
ora....A2.lsnr application    ONLINE    ONLINE    zbdba2     
ora.zbdba2.gsd application    OFFLINE   OFFLINE              
ora.zbdba2.ons application    ONLINE    ONLINE    zbdba2     
ora.zbdba2.vip ora....t1.type ONLINE    ONLINE    zbdba2     

ok,終於搞定。另外一個節點也啟動。crs啟停一遍做一下測試。




相關推薦

ASM磁碟遷移

環境: Source: OS:redhat 6.3 DB:Oralce RAC 11.2.4.0 destination: OS:redhat 6.3 DB:Oralce RAC 11.2.4.0 背景:客戶的PC機上面有兩個例項,壓力太大,需要遷移出一個例項。資料量TB級

記 一次asm磁碟資料遷移案例

前     言資料庫在新增資料檔案時報錯:ORA-01119,ORA-17520,ORA-00600錯誤,根據報錯無法判斷故障點,而且生產庫無法進行其他測試,比較穩妥的辦法是新建一個磁碟組,將現有的資料遷移到新的磁碟組上。環境介紹作業系統:solaris 11資料庫版本:11

oracle RAC 更換儲存遷移資料(線上遷移ASM磁碟)測試

oracle RAC 更換儲存遷移資料 我們利用ASM rebalance特性實現更換儲存遷移資料的需求 基本零宕機時間(操作步驟總結) 1)保證新儲存和RAC當前節點間的可用性; 2)新儲存劃分LUN,可以重新規劃儲存方案; 3)遷移OCR和表決盤 4)給現有ASM磁碟組

在Oracle Database 12.1 中遷移恢復數據庫【實戰】

異機恢復 oracle12c restore recover 平臺環境:源OS:Oracle Linux 7.3源DB:Oracle Database 12.1.0.2 目標OS:Oracle Linux 7.3目標DB:Oracle Database 12.1.0.2一、準備工作1、查詢當前

Oracle RAC環境下ASM磁碟擴容

生產環境注意調整以下引數: +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1.節點間滾

Liunx安裝並配置multipath多路徑,併為oracle asm磁碟配置許可權和規則

        在生產環境中,Oracle RAC的搭建需要有共享儲存的支援,而共享儲存上的每個LUN掛載到伺服器上通常是多條路徑的,這樣就需要在伺服器上安裝多路徑軟體來整合一個LUN的多條鏈路。有的儲存廠商會有自己的多路徑軟體,但有的卻沒有,這就需要我們自己來安裝多路徑軟體

oracle RAC如何正確地刪除ASM磁碟

1.檢查確認要刪除的磁碟組是否在用 select * from dba_data_files; select * from dba_temp_files; select * from v$logfile;2.先在各節點上dismount磁碟組 alter diskgroup

udev繫結ASM磁碟

[[email protected] rules.d]# fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units =

ASM 無法發現候選磁碟----丟失的ASM磁碟 ASM磁碟無法掛載

近日遇到一個問題,ASM的磁碟組無法掛載,之前是正常的,由於一些其他的操作,資料庫啟動失敗,當問題排除時候,發現在資料庫整體啟動時,掛載磁碟組的環節出現問題。 環境介紹 #######################################

如何解除安裝並刪除ASM磁碟

1、以oracle使用者登入RAC資料庫節點1: [email protected]:~> export ORACLE_SID=+ASM1 [email protected]:~> sqlplus sys/xxxxx as sysdba S

ASM磁碟建立Grid Infrastructure 12安裝圖解(一)

裝ASM和grid Infrastructure 12C 相關的資訊如下 名稱 版本號 RedHat  rhel-server-6.7-x86_64-dvd Oracle VM VirtualBox 5.0.2 Grid Infrastructur

ASM磁碟由哪些物理磁碟組成?

asm createdisk VOL1 /dev/sdc1 Marking disk "/dev/sdc1" as an ASM disk:                   [  OK  ] # /etc/init.d/oracleasm createdisk VOL2 /dev/sdd1 Marking

ASM磁碟建立Grid Infrastructure 12安裝圖解(二)

裝ASM和grid Infrastructure 12C 相關軟體的資訊如下 名稱 版本號 RedHat  rhel-server-6.7-x86_64-dvd Oracle VM VirtualBox 5.0.2 Grid

無法複製和rename ASM磁碟上的資料檔案處理方法

由於SYSTEM 資料檔案丟失,啟動資料庫時會報如下無法標識或找不到資料檔案1的錯誤: 03:47:02 [email protected]*SQL> startup; ORACLE instance started. Total System Global

oracle 11g 單節點安裝 ASM,找不到ASM磁碟

原因: Could notconnect to ASM due to following error ORA-01031:insufficientprivileges [[email protected] bin]# id oracle uid=54321(ora

遷移OCR、表決磁碟asm spfile到其他磁碟

本文參考:https://levipereira.wordpress.com/2012/01/11/explaining-how-to-store-ocr-voting-disks-and-asm-spfile-on-asm-diskgroup-rac-or-rac-ext

【Azure】ASM虛擬遷移到ARM中

官網 orm 成功 mit ubuntu 準備 發現 執行 資源管理器 這兩天開始講之前在老門戶(ASM)中的虛擬機往新門戶(ARM)中進行遷移,閱讀了很多博主的文章和微軟雲網站的介紹,在下使用微軟雲官網介紹的遷移工具進行遷移。在開始遷移體驗之前,了解一下整個遷移的流程,總

rac遷移ocr,votedisk,引數檔案,資料檔案,控制檔案,密碼檔案,redo,undo,temp,asm磁碟

概述:資料庫沒有開啟歸檔,當前環境12.1。votedg(normal)遷移到dg_vote(external),把votedg下的磁碟新增到dg_vote中,並幹掉votedg 因為只建立了votedg磁碟組,cdb,pdb也建立在上面,過程還是比較複雜,因為資料庫很多檔案都放在voted

ASM之ARCH磁碟掛了學習筆記

alter diskgroup arch mount * ERROR at line 1: ORA-15032: not all alterations performed ORA-15130: diskgroup "ARCH" is being dismounted ORA-15066: of

記一次虛擬機器複製遷移啟動報could not open disk image /123.img: Invalid argument 錯誤

過程是這樣的; 內網兩臺機器 192.168.2.215  複製出 192.168.2.203  複製到此處啟動 啟動時報錯 virsh # start z6-006-208 error: Failed to start domain z6-006-208 error: