ICode9

精准搜索请尝试: 精确搜索
首页 > 数据库> 文章详细

RMAN迁移数据库到ASM(一)创建ASM磁盘组

2020-04-28 17:53:52  阅读:248  来源: 互联网

标签:aix227 app SYS oracle 磁盘 RMAN ASM u01


RMAN迁移数据库到ASM(一)创建ASM磁盘组

Migrating Databases To and From ASM with Recovery Manager

使用RMAN将文件系统中oracle 10g数据库文件迁移到ASM磁盘组。
文章分为三个部分:一、创建ASM磁盘组 二、切换数据文件到ASM 三、迁移临时文件、online log等到ASM

博文连接:http://blog.itpub.net/29475508/viewspace-1296443/

【实验环境】
操作系统     : AIX5.3
数据库版本:Oracle 10.2.0
存储设备   :SUN T3 光纤阵列

【文章目录】


【实验过程】

1.创建逻辑卷
1.1、查看AIX光纤适配卡Network Address

  1. [root@aix227:/]#lsdev -c adapter | grep -i fc
  2. fcs0 Available 04-08 FC Adapter
  3. [root@aix227:/]#
  4. [root@aix227:/]#lscfg -vpl fcs0 | grep -i network
  5.         Network Address.............10000000C945AA65

1.2、阵列上划分volslice ,绑定lun

  1. volslice create aix227_02 -z 30gb v01
  2. 查看新划分的aix227_02 的slice num
  3. :/:<4>volslice list
  4. Slice Slice Num Start Blk Size Blks Capacity Volume
  5. aix227_02 8 692186880 62926080 30.004 GB v01
  6. 绑定lun
  7. lun perm lun 8 rw wwn 10000000C945AA65
  8. :/:<8>lun perm list lun 8
  9. List of WWNs and their access right to lun 8
  10. -------------------------------------------------------------------------------------------------------
  11. lun slice WWN Group Name Group Perm WWN Perm Effective Perm
  12. --------------------------------------------------------------------------------------------------------
  13. 8 8 default -- -- none none
  14. 8 8 10000000c945aa65 -- -- rw rw
  15. -------------------------------------------------------------------------------------------------------

1.3、AIX上识别新磁盘

cfgmgr -v

lspv 查看


chdev -l hdisk1 -a pv=yes 识别pvid


1.4、smit vg创建vg



1.5、创建lv







2、启动 ASM 实例

2.1、创建dump目录

[oracle@aix227:/u01/app/oracle/admin]$mkdir +ASM

[oracle@aix227:/u01/app/oracle/admin]$cd +ASM/

[oracle@aix227:/u01/app/oracle/admin/+ASM]$mkdir -p bdump cdump udump

[oracle@aix227:/u01/app/oracle/admin/+ASM]$ls

bdump  cdump  udump

[oracle@aix227:/u01/app/oracle/admin/+ASM]$

2.2、编辑init+ASM.ora

[oracle@aix227:/u01/app/oracle/product/10.2.0/db_1/dbs]$more init+ASM.ora

asm_diskstring='/dev/rlv*'

background_dump_dest='/u01/app/oracle/admin/+ASM/bdump'

core_dump_dest='/u01/app/oracle/admin/+ASM/cdump'

user_dump_dest='/u01/app/oracle/admin/+ASM/udump'

instance_type='ASM'

2.3、sqlplus登录ASM

 

[oracle@aix227:/home/oracle]$export ORACLE_SID=+ASM

[oracle@aix227:/home/oracle]$sqlplus '/as sysdba'

2.4、启动ASM实例





【报错ORA-29701 情况处理】

SYS@ +ASM>startup

ORA-29701: unable to connect to Cluster Manager

SYS@ +ASM>

 

 

CSS连接ASM实例和oracle实例

 

[oracle@aix227:/home/oracle]$cd $ORACLE_HOME/bin

 [oracle@aix227:/u01/app/oracle/product/10.2.0/db_1/bin]$./localconfig delete

You must be logged in as root to run ./localconfig.

Log in as root and restart ./localconfig execution.

 

[root@aix227:/]#cd /u01/app/oracle/product/10.2.0/db_1/bin/

[root@aix227:/u01/app/oracle/product/10.2.0/db_1/bin]#./localconfig delete

/etc/oracle does not exist. Creating it now.

./localconfig[715]: /etc/init.cssd:  not found

 

[root@aix227:/u01/app/oracle/product/10.2.0/db_1/bin]#./localconfig add

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'system'..

Operation successful.

Configuration for local CSS has been initialized

Adding to inittab

Startup will be queued to init within 30 seconds.

Checking the status of new Oracle init process...

Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.

        aix227

CSS is active on all nodes.

Oracle CSS service is installed and running under init(1M)

 

 

3、创建ASM磁盘组

3.1、创建ASM disk group

create diskgroup DATA normal redundancy failgroup fg1 disk '/dev/rlv1data' failgroup fg2 disk '/dev/rlv2data';

 

create diskgroup LOG normal redundancy failgroup fg1 disk '/dev/rlv3log' failgroup fg2 disk '/dev/rlv4log';

create diskgroup ARCH normal redundancy failgroup fg1 disk '/dev/rlv5arch', failgroup fg2 disk '/dev/rlv6arch';

create diskgroup RECOVERY normal redundancy failgroup fg1 disk '/dev/rlv7reco' failgroup fg2 disk '/dev/rlv8reco';

 

select group_number,name,state,type,total_mb,free_mb,usable_file_mb from v$asm_diskgroup; 

 

 

3.2、生成spfile

使diskgroup在实例启动后能够自动挂载

SYS@ +ASM>create spfile from pfile;

SYS@ +ASM>shutdown immediate;

SYS@ +ASM>startup nomount;

 

SYS@ +ASM>alter diskgroup RECOVERY mount;

SYS@ +ASM>alter diskgroup ARCH mount;

SYS@ +ASM>alter diskgroup LOG mount;

SYS@ +ASM>alter diskgroup DATA mount;

 

SYS@ +ASM>startup force;

SYS@ +ASM>select group_number,name,state,type,total_mb,free_mb from v$asm_diskgroup;

 

 

 

生成spfile、手动mount一次后,再次重启已经可以自动mount 

生成pfile查看,已经自动添加了一行

SYS@ +ASM>create pfile from spfile;



吕星昊
2014.10.12

标签:aix227,app,SYS,oracle,磁盘,RMAN,ASM,u01
来源: https://www.cnblogs.com/yaoyangding/p/12795817.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有