设为首页 加入收藏

TOP

ASM磁盘组异机迁移(一)
2015-07-24 11:12:20 来源: 作者: 【 】 浏览:21
Tags: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;

[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 --rep
首页 上一页 1 2 3 4 5 6 7 下一页 尾页 1/8/8
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇如何诊断rac环境下sysdate返回错.. 下一篇统计对象大小函数性能比较

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·数据库:推荐几款 Re (2025-12-25 12:17:11)
·如何最简单、通俗地 (2025-12-25 12:17:09)
·什么是Redis?为什么 (2025-12-25 12:17:06)
·对于一个想入坑Linux (2025-12-25 11:49:07)
·Linux 怎么读? (2025-12-25 11:49:04)