一、配置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,重命名为disk2、disk3(使用操作系统复制比使用asmtool直接创建要快),这样现在有三块磁盘disk1、disk2、disk3。
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_diskstring:E:\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)冗余,disk1、disk2,存放数据库
dg2:外部(external)冗余,disk3,存放闪回恢复区
二、创建数据库
使用DBCA创建数据库,数据库使用dg1,闪回恢复区使用dg2
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25744374/viewspace-722105/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/25744374/viewspace-722105/