创建ASM数据库

一、配置ASM

1、使用ASMTOOL创建磁盘

C:\Users\Administrator>asmtool 

ASM-00200: Invalid command option

ASM-00208: asmtool -add [-force] \Device\Harddisk1\Partition1 ORCLDISKasm0 ...

ASM-00209: asmtool -addprefix asm [-force] \Device\Harddisk1\Partition1 ...

ASM-00210: asmtool -create \\server\share\file

ASM-00211: asmtool -delete ORCLDISKasm0 [ORCLDISKasm1 ...]

ASM-00212: asmtool -list [ORCLDISKasm0 ORCLDISKasm1 ...]

=======================================================================

 

C:\Users\Administrator>asmtool -create E:\asmdisk\DISK1 1024   --使用asmtool创建disk1

 

使用操作系统复制disk1,重命名为disk2disk3(使用操作系统复制比使用asmtool直接创建要快),这样现在有三块磁盘disk1disk2disk3

 

2、配置oracle集群同步服务(CSS

C:\Users\Administrator>localconfig

usage:  crssetup

                         | ladd | shutdown | upgrade | help>

                  config   - configure and startup the cluster on nodes

                  add      - add specified nodes to the cluster

                  del      - delete the specified nodes from the cluster

                  deconfig - wipe out all cluster configuration information

                  ldel     - local css delete from oracle home

                  lres     - local css home reset to new oracle home

                  ladd     - local css add to oracle home

                  shutdown - shutdown the selected nodes

                  upgrade  - upgrade the specified nodes

                  help     - print out this information

=================================================================

 

C:\Users\Administrator>localconfig add

Step 1:  creating new OCR repository

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'administrator', privgrp ''..

Operation successful.

Step 2:  creating new CSS service

successfully created local CSS service

successfully added CSS to home

 

3、  使用DBCA配置自动存储管理(ASM

1)、DBCA步骤1

asm参数:asm_diskstringE:\asmdisk\*

完成步骤一,+ASM实例已经创建完成。此时使用sqlplus连接实例。

C:\Users\Administrator>set oracle_sid=+asm

 

C:\Users\Administrator>sqlplus / as sysdba

 

SQL*Plus: Release 10.2.0.3.0 - Production on Tue Apr 24 11:59:52 2012

 

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

 

 

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production

With the Partitioning, OLAP and Data Mining options

 

SYS@ +asm > select path from v$asm_disk;          --查询结果为空。必须完成下面的步骤

 

no rows selected

2)、要使用文件代替磁盘,此处必须修改一个参数_asm_allow_only_raw_disks

SYS@ +asm > alter system set "_asm_allow_only_raw_disks"=false scope=spfile;

 

System altered.

SYS@ +asm > shutdown immediate

ORA-15100: invalid or missing diskgroup name

 

 

ASM instance shutdown

SYS@ +asm > startup

ASM instance started

 

Total System Global Area   83886080 bytes

Fixed Size                  1289028 bytes

Variable Size              57431228 bytes

ASM Cache                  25165824 bytes

ORA-15110: no diskgroups mounted

 

SYS@ +asm > select path from v$asm_disk;     --现在可以查看到创建的三块磁盘!

 

PATH

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

E:\ASMDISK\DISK1

E:\ASMDISK\DISK3

E:\ASMDISK\DISK2

3)、DBCA步骤2,创建磁盘组

dg1:常规(normal)冗余,disk1disk2,存放数据库

dg2:外部(external)冗余,disk3,存放闪回恢复区

 

二、创建数据库

使用DBCA创建数据库,数据库使用dg1,闪回恢复区使用dg2

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25744374/viewspace-722105/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25744374/viewspace-722105/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值