oracle@myserver:~# export ORACLE_BASE=/opt/oracle
oracle@myserver:~# export ORACLE_HOME=/opt/oracle/product/10.2.0/db_1
oracle@myserver:~# export ORACLE_SID="+ASM"
oracle@myserver:~# echo "INSTANCE_TYPE=ASM" > /tmp/init+ASM.ora
oracle@myserver:~# sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Mar 28 11:27:55 2011
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 Scoring Engine options
SQL> CREATE SPFILE FROM PFILE='/tmp/init+ASM.ora';
SQL> startup nomount
ASM instance started
Total System Global Area 125829120 bytes
Fixed Size 1301456 bytes
Variable Size 124527664 bytes
Database Buffers 0 bytes
Redo Buffers 0 bytes
SQL> alter system set asm_diskstring='/opt/oracle/product/10.2.0/db_1/devices/dev*';
SQL> show parameter asm_diskstring
NAME TYPE VALUE
--------------- ----------- ---------------------------------------------
asm_diskstring string /opt/oracle/product/10.2.0/db_1/devices/dev*
SQL> CREATE DISKGROUP disk NORMAL REDUNDANCY
SQL> FAILGROUP failure_group_1 DISK
SQL> '/opt/oracle/product/10.2.0/db_1/devices/deva1' NAME diska1,
SQL> '/opt/oracle/product/10.2.0/db_1/devices/deva2' NAME diska2,
SQL> FAILGROUP failure_group_2 DISK
SQL> '/opt/oracle/product/10.2.0/db_1/devices/devb1' NAME diskb1,
SQL> '/opt/oracle/product/10.2.0/db_1/devices/devb2' NAME diskb2;
SQL> select name, header_status, path from v$asm_disk;
NAME HEADER_STAT PATH
------------- ----------- ---------------------------------------------
DISKB1 MEMBER /opt/oracle/product/10.2.0/db_1/devices/devb1
DISKA3 CANDIDATE /opt/oracle/product/10.2.0/db_1/devices/deva3
DISKA1 MEMBER /opt/oracle/product/10.2.0/db_1/devices/deva1
DISKB3 CANDIDATE /opt/oracle/product/10.2.0/db_1/devices/devb3
DISKB2 MEMBER /opt/oracle/product/10.2.0/db_1/devices/devb2
DISKA2 MEMBER /opt/oracle/product/10.2.0/db_1/devices/deva2
SQL> CREATE DISKGROUP fra EXTERNAL REDUNDANCY DISK
SQL> '/opt/oracle/product/10.2.0/db_1/devices/deva3' NAME diska3,
SQL> '/opt/oracle/product/10.2.0/db_1/devices/devb3' NAME diskb3;
SQL> select g.name as DISKGROUP, d.name as DISK, FAILGROUP, TYPE, d.TOTAL_MB, d.FREE_MB
SQL> from v$asm_disk d, v$asm_diskgroup g where d.GROUP_NUMBER=g.GROUP_NUMBER order by 1, 3, 2;
DISKGROUP DISK FAILGROUP TYPE TOTAL_MB FREE_MB
---------- ---------- -------------------- ------ ---------- ----------
DISK DISKA1 FAILURE_GROUP_1 NORMAL 1500 746
DISK DISKA2 FAILURE_GROUP_1 NORMAL 1500 772
DISK DISKB1 FAILURE_GROUP_2 NORMAL 1500 752
DISK DISKB2 FAILURE_GROUP_2 NORMAL 1500 766
FRA DISKA3 DISKA3 EXTERN 1500 1184
FRA DISKB3 DISKB3 EXTERN 1500 1186
Links related to ASM:
Using Automatic Storage Management
Automatic Storage Management (ASM) in Oracle Database 10g
Migrating Databases To and From ASM with Recovery Manager
No comments:
Post a Comment