码迷,mamicode.com
首页 > 其他好文 > 详细

ASM磁盘组异机迁移

时间:2015-02-10 11:21:33      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:rac   迁移   

环境:
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;

[grid@zbdba1 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'


[oracle@zbdba1 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


[root@zbdba1 ~]# ls /dev/asm*
/dev/asm-diskb  /dev/asm-diskc  /dev/asm-diskd  /dev/asm-diske  /dev/asm-diskf

[root@zbdba2 ~]# 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参数文件

[grid@zbdba1 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'
改为:
[grid@zbdba1 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'
 
[grid@zbdba1 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: [crsd.bin@zbdba1 (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、创建数据库参数文件

[oracle@zbdba1 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'


配置环境变量:

[oracle@zbdba1 ~]$ 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资源中:

[grid@zbdba1 /]$ 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


[root@zbdba1 ~]# 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资源中

[oracle@zbdba1 dbs]$ /opt/grid/products/11.2.0/bin/srvctl add database -d test -o /opt/oracle/products/11.2.0/

[root@zbdba1 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:
[root@zbdba1 dev]# crs_start ora.test.db

[root@zbdba1 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磁盘组异机迁移

标签:rac   迁移   

原文地址:http://blog.csdn.net/zbdba/article/details/43699527

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!