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

2024-04-04 03:08

本文主要是介绍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:

Connected to:
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=1k count=1000000

1000000+0 records in
1000000+0 records out

SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm2 bs=1k count=1000000

1000000+0 records in
1000000+0 records out

SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm3 bs=1k count=1000000

1000000+0 records in
1000000+0 records out

SQL> host dd if=/dev/zero of=d:/asmfake/fakeasm4 bs=1k 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  03:00 PM    <DIR>          .
06/11/2008  03:00 PM    <DIR>          ..
06/11/2008  02:58 PM     1,024,000,000 fakeasm1
06/11/2008  02:59 PM     1,024,000,000 fakeasm2
06/11/2008  03:00 PM     1,024,000,000 fakeasm3
06/11/2008  03:01 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

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

QQ: 492913789
Email: ahdba@qq.com
Blog: http://www.cndba.cn/dave

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

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

聊天 群:40132017   聊天2群:69087192

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

这篇关于ASM Using OS Files Instead of Real Raw Devices On Windows. [ID 602620.1]的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/874661

相关文章

基于Python实现一个Windows Tree命令工具

《基于Python实现一个WindowsTree命令工具》今天想要在Windows平台的CMD命令终端窗口中使用像Linux下的tree命令,打印一下目录结构层级树,然而还真有tree命令,但是发现... 目录引言实现代码使用说明可用选项示例用法功能特点添加到环境变量方法一:创建批处理文件并添加到PATH1

Springboot3+将ID转为JSON字符串的详细配置方案

《Springboot3+将ID转为JSON字符串的详细配置方案》:本文主要介绍纯后端实现Long/BigIntegerID转为JSON字符串的详细配置方案,s基于SpringBoot3+和Spr... 目录1. 添加依赖2. 全局 Jackson 配置3. 精准控制(可选)4. OpenAPI (Spri

Windows的CMD窗口如何查看并杀死nginx进程

《Windows的CMD窗口如何查看并杀死nginx进程》:本文主要介绍Windows的CMD窗口如何查看并杀死nginx进程问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地... 目录Windows的CMD窗口查看并杀死nginx进程开启nginx查看nginx进程停止nginx服务

Windows 系统下 Nginx 的配置步骤详解

《Windows系统下Nginx的配置步骤详解》Nginx是一款功能强大的软件,在互联网领域有广泛应用,简单来说,它就像一个聪明的交通指挥员,能让网站运行得更高效、更稳定,:本文主要介绍W... 目录一、为什么要用 Nginx二、Windows 系统下 Nginx 的配置步骤1. 下载 Nginx2. 解压

windows系统上如何进行maven安装和配置方式

《windows系统上如何进行maven安装和配置方式》:本文主要介绍windows系统上如何进行maven安装和配置方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不... 目录1. Maven 简介2. maven的下载与安装2.1 下载 Maven2.2 Maven安装2.

使用Python实现Windows系统垃圾清理

《使用Python实现Windows系统垃圾清理》Windows自带的磁盘清理工具功能有限,无法深度清理各类垃圾文件,所以本文为大家介绍了如何使用Python+PyQt5开发一个Windows系统垃圾... 目录一、开发背景与工具概述1.1 为什么需要专业清理工具1.2 工具设计理念二、工具核心功能解析2.

MySQL查看表的最后一个ID的常见方法

《MySQL查看表的最后一个ID的常见方法》在使用MySQL数据库时,我们经常会遇到需要查看表中最后一个id值的场景,无论是为了调试、数据分析还是其他用途,了解如何快速获取最后一个id都是非常实用的技... 目录背景介绍方法一:使用MAX()函数示例代码解释适用场景方法二:按id降序排序并取第一条示例代码解

Windows Server 2025 搭建NPS-Radius服务器的步骤

《WindowsServer2025搭建NPS-Radius服务器的步骤》本文主要介绍了通过微软的NPS角色实现一个Radius服务器,身份验证和证书使用微软ADCS、ADDS,具有一定的参考价... 目录简介示意图什么是 802.1X?核心作用802.1X的组成角色工作流程简述802.1X常见应用802.

windows和Linux安装Jmeter与简单使用方式

《windows和Linux安装Jmeter与简单使用方式》:本文主要介绍windows和Linux安装Jmeter与简单使用方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地... 目录Windows和linux安装Jmeter与简单使用一、下载安装包二、JDK安装1.windows设

使用nohup和--remove-source-files在后台运行rsync并记录日志方式

《使用nohup和--remove-source-files在后台运行rsync并记录日志方式》:本文主要介绍使用nohup和--remove-source-files在后台运行rsync并记录日... 目录一、什么是 --remove-source-files?二、示例命令三、命令详解1. nohup2.