DBCA创建asm
asm一来css服务,创建前先启动css
[root@localhost ~]# /u01/app/Oracle/10.2.0/db_1/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Configuration for local CSS has been initialized
Adding to inittab
Startup will be queued to init within 90 seconds.
Checking the status of new Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
localhost
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)

Create new disk

此时会发现刚创建的ASM磁盘组free仅为所有磁盘的一般,默认的一般磁盘用来做冗余

接下来就是按照常规的dbca创建数据库,但是选择asm做存储

其他步骤根据自己需求选择即可,此处不赘述
安装完成设置ASM实例,即可管理ASM
[oracle@localhost ~]$ export ORACLE_SID=+ASM
[oracle@localhost ~]$ sqlplus / as sysdba
SQL> select status from v$instance;
STATUS
------------
STARTED
SQL> col name for a11
SQL> col failgroup for a11
SQL> select state,total_mb,free_mb,name,failgroup from v$asm_disk;
STATE TOTAL_MB FREE_MB NAME FAILGROUP
-------- ---------- ---------- ----------- -----------
NORMAL 8189 7374 ASM_GROUP1 ASM_GROUP1
NORMAL 8189 7379 ASM_GROUP2 ASM_GROUP2
NORMAL 8189 7382 ASM_GROUP3 ASM_GROUP3
SQL> select group_number,name,state,type,total_mb,free_mb,unbalanced from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB U
------------ ----------- ----------- ------ ---------- ---------- -
1 DATA MOUNTED NORMAL 24567 22135 N
设置数据库实例即可登入数据库
[oracle@localhost ~]$ export ORACLE_SID=orclasm
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jul 30 17:02:29 2014
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL> col TABLESPACE_NAME for a15
SQL> col FILE_NAME for a47
SQL> select tablespace_name,file_name from dba_data_files;
TABLESPACE_NAME FILE_NAME
--------------- -----------------------------------------------
USERS +DATA/orcl_asm/datafile/users.259.854297377
SYSAUX +DATA/orcl_asm/datafile/sysaux.257.854297377
UNDOTBS1 +DATA/orcl_asm/datafile/undotbs1.258.854297377
SYSTEM +DATA/orcl_asm/datafile/system.256.854297375
更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12
本文永久更新链接地址:http://www.linuxidc.com/Linux/2014-08/104931.htm
