ASM using OS files instead of real raw devices on Windows. [ID 602620.1]

Source: Internet
Author: User

 

On Windows, use OS files instead of raw devices. The procedure is as follows:

 

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:

Connected:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0-Production
With the partitioning, Oracle Label Security, OLAP and Data Mining options

Instance_name
----------------
+ ASM

SQL> alter system set "_ asm_allow_only_raw_disks" = false scope = spfile;
System altered.

 

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

SQL> select path from V $ asm_disk;

Path
--------------------------------------------------------------------------------
//./Orcldiskdg0
//./Orcldiskdg1
//./Orcldiskdata0
//./Orcldiskdata1
//./Orcldiskdata2
//./Orcldiskdata3
//./Orcldiskfra0
//./Orcldiskfra1

8 rows selected.

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

SQL> host mkdir D:/asmfake

 

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

SQL> alter system set asm_diskstring = '//./orcldisk *', 'd:/asmfake/* 'scope = both;
System altered.

 

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

SQL> Shutdown
ASM diskgroups dismounted
ASM instance Shutdown

SQL> startup
ASM instance started

Total system global area 83886080 bytes
Fixed size 1289028 bytes
Variable Size 57431228 bytes
ASM cache 25165824 bytes
ASM diskgroups mounted

SQL> show parameter ASM

Name type value
-----------------------------------------------------------------------------
_ Asm_allow_only_raw_disks Boolean false
Asm_diskgroups string datadg, fradg
Asm_diskstring string //./orcldisk *, D:/asmfake /*
Asm_power_limit integer 1

 

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> host dd If =/dev/Zero of = D:/asmfake/fakeasm1 BS = 1 K COUNT = 1000000

1000000 + 0 records in
1000000 + 0 records out

SQL> host dd If =/dev/Zero of = D:/asmfake/fakeasm2 BS = 1 K COUNT = 1000000

1000000 + 0 records in
1000000 + 0 records out

SQL> host dd If =/dev/Zero of = D:/asmfake/fakeasm3 BS = 1 K COUNT = 1000000

1000000 + 0 records in
1000000 + 0 records out

SQL> host dd If =/dev/Zero of = D:/asmfake/fakeasm4 BS = 1 K COUNT = 1000000

1000000 + 0 records in
1000000 + 0 records out

SQL> host dir D:/asmfake /*
Volume in drive D is new volume
Volume serial number is 94b6-1fc7

Directory of D:/asmfake

06/11/2008 PM <DIR>.
06/11/2008 PM <DIR> ..
06/11/2008 PM 1,024,000,000 fakeasm1
06/11/2008 PM 1,024,000,000 fakeasm2
06/11/2008 PM 1,024,000,000 fakeasm3
06/11/2008 PM 1,024,000,000 fakeasm4
4 File (s) 4,096,000,000 bytes
2 Dir (s) 19,148,734,464 bytes free

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

SQL> select path from V $ asm_disk;

Path
----------------------------------------------------------
D:/asmfake/fakeasm1
D:/asmfake/fakeasm2
D:/asmfake/fakeasm3
D:/asmfake/fakeasm4
//./Orcldiskdg0
//./Orcldiskdg1
//./Orcldiskdata0
//./Orcldiskdata1
//./Orcldiskdata2
//./Orcldiskdata3
//./Orcldiskfra0
//./Orcldiskfra1

12 rows selected.

 

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

SQL> Create diskgroup test external redundancy disk 'd:/asmfake/fakeasm1 ',
2 'd:/asmfake/fakeasm2 ',
3 'd:/asmfake/fakeasm3 ',
4 'd:/asmfake/fakeasm4 ';

Diskgroup created.

SQL> select name, State from V $ asm_diskgroup;

Name state
-----------------------------------------
Datadg mounted
Fradg mounted
Test mounted

SQL> select name, path from V $ asm_disk where group_number = 3;

Name path
----------------------------------------------------------------
Test_0000 D:/asmfake/fakeasm1
Test_0001 D:/asmfake/fakeasm2
Test_0002 D:/asmfake/fakeasm3
Test_0003 D:/asmfake/fakeasm4

 

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

 

 

 

 

From Oracle

Bytes -------------------------------------------------------------------------------------------------------

Blog: http://blog.csdn.net/tianlesoftware

Email: dvd.dba@gmail.com

Dba1 group: 62697716 (full); dba2 group: 62697977 (full) dba3 group: 62697850 (full)

Super DBA group: 63306533 (full); dba4 group: 83829929 dba5 group: 142216823

Chat group: 40132017 chat 2 group: 69087192

-- Add the group to describe the relationship between Oracle tablespace and data files in the remarks section. Otherwise, the application is rejected.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.