ASM Using OS Files Instead of Real Raw Devices On Windows. [ID 602620.1]

Windows 平台下,使用OS files 代替raw devices,步骤如下:

1) If the ASM instance was not created, then create an ASM instance thru the DBCA .

2) Update the initialization parameter file with the next hidden parameter:

Connectedto:
OracleDatabase10gEnterpriseEditionRelease10.2.0.3.0-Production
WiththePartitioning,OracleLabelSecurity,OLAPandDataMiningoptions

INSTANCE_NAME
----------------
+asm

SQL>altersystemset"_asm_allow_only_raw_disks"=falsescope=spfile;
Systemaltered.

3) If you have real raw devices you will see them after create the ASM instance:

SQL>selectpathfromv$asm_disk;

PATH
--------------------------------------------------------------------------------
//./ORCLDISKDG0
//./ORCLDISKDG1
//./ORCLDISKDATA0
//./ORCLDISKDATA1
//./ORCLDISKDATA2
//./ORCLDISKDATA3
//./ORCLDISKFRA0
//./ORCLDISKFRA1

8rowsselected.

4) Create the new directory to allocate the fake files/disks:

SQL>hostmkdird:/asmfake

5) Update the ASM instance with the new path associated with the fake directory:

SQL>altersystemsetasm_diskstring='//./ORCLDISK*','d:/asmfake/*'scope=both;
Systemaltered.

6) Shutdown and startup the ASM instance to apply the changes:

SQL>shutdown
ASMdiskgroupsdismounted
ASMinstanceshutdown

SQL>startup
ASMinstancestarted

TotalSystemGlobalArea83886080bytes
FixedSize1289028bytes
VariableSize57431228bytes
ASMCache25165824bytes
ASMdiskgroupsmounted

SQL>showparameterasm

NAMETYPEVALUE
-----------------------------------------------------------------------------
_asm_allow_only_raw_disksbooleanFALSE
asm_diskgroupsstringDATADG,FRADG
asm_diskstringstring//./ORCLDISK*,d:/asmfake/*
asm_power_limitinteger1

7) In order to create fake files to be used as ASM disks you will need to create them thru the dd command, therefore please install the dd command for windows, you can download it from:

http://www.chrysocome.net/dd

8) Then create the desired fake disks/files on the fake directory:

SQL>hostddif=/dev/zeroof=d:/asmfake/fakeasm1bs=1kcount=1000000

1000000+0recordsin
1000000+0recordsout

SQL>hostddif=/dev/zeroof=d:/asmfake/fakeasm2bs=1kcount=1000000

1000000+0recordsin
1000000+0recordsout

SQL>hostddif=/dev/zeroof=d:/asmfake/fakeasm3bs=1kcount=1000000

1000000+0recordsin
1000000+0recordsout

SQL>hostddif=/dev/zeroof=d:/asmfake/fakeasm4bs=1kcount=1000000

1000000+0recordsin
1000000+0recordsout


SQL>hostdird:/asmfake/*
VolumeindriveDisNewVolume
VolumeSerialNumberis94B6-1FC7

Directoryofd:/asmfake

06/11/200803:00PM<DIR>.
06/11/200803:00PM<DIR>..
06/11/200802:58PM1,024,000,000fakeasm1
06/11/200802:59PM1,024,000,000fakeasm2
06/11/200803:00PM1,024,000,000fakeasm3
06/11/200803:01PM1,024,000,000fakeasm4
4File(s)4,096,000,000bytes
2Dir(s)19,148,734,464bytesfree

9) Connect to the ASM instance and make sure the fake disks are visible:

SQL>selectpathfromv$asm_disk;

PATH
----------------------------------------------------------
D:/ASMFAKE/FAKEASM1
D:/ASMFAKE/FAKEASM2
D:/ASMFAKE/FAKEASM3
D:/ASMFAKE/FAKEASM4
//./ORCLDISKDG0
//./ORCLDISKDG1
//./ORCLDISKDATA0
//./ORCLDISKDATA1
//./ORCLDISKDATA2
//./ORCLDISKDATA3
//./ORCLDISKFRA0
//./ORCLDISKFRA1

12rowsselected.

10) Then create diskgroup(s) using the fake disks:

SQL>creatediskgroupTESTexternalredundancydisk'D:/ASMFAKE/FAKEASM1',
2'D:/ASMFAKE/FAKEASM2',
3'D:/ASMFAKE/FAKEASM3',
4'D:/ASMFAKE/FAKEASM4';

Diskgroupcreated.

SQL>selectname,statefromv$asm_diskgroup;

NAMESTATE
-----------------------------------------
DATADGMOUNTED
FRADGMOUNTED
TESTMOUNTED

SQL>selectname,pathfromv$asm_diskwheregroup_number=3;

NAMEPATH
----------------------------------------------------------------
TEST_0000D:/ASMFAKE/FAKEASM1
TEST_0001D:/ASMFAKE/FAKEASM2
TEST_0002D:/ASMFAKE/FAKEASM3
TEST_0003D:/ASMFAKE/FAKEASM4

11) Now your new diskgroup was created using OS files.

From Oracle

-------------------------------------------------------------------------------------------------------

Blog http://blog.youkuaiyun.com/tianlesoftware

Email: dvd.dba@gmail.com

DBA1 群:62697716(); DBA2 群:62697977() DBA3 群:62697850()

DBA 超级群:63306533(); DBA4 群: 83829929 DBA5群: 142216823

聊天 群:40132017 聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值