You are on page 1of 60

ORACLE 10g ASM

May 17th, 2006

Inderpal S. Johal
Principal Consultant

Agenda
What is ASM Benefits of ASM ASM Architecture ASM Components DB Instance parameters to support ASM ASM Instance Monitoring using EM ASM Views Migrating from File system to ASM Miscellaneous Tips Q&A

Data Softech Inc.

Oracle 10g ASM

What is ASM
ASM stands for Automatic Storage Management It is Oracle Cluster File System and Volume Manager Designed for Oracle Database Related Files Provide Storage management capabilities like striping as well as mirroring
Data files Log files Archived files Control Files DataGuard Change Tracking File

Not Certified for Trace Files ORACLE_HOME Voting Disk OCR Files Alert Log Password File Binary File (BFILE)

Temp File SPfile DG file Flashback Logs Datapump File

Data Softech Inc.

Oracle 10g ASM

Benefits of Automatic Storage Management


Provide efficient management of storage No need for buggy OCFS or expensive 3rd party CFS Provide integrated Cluster File system and Volume management capabilities Traditional Volume Mgmt.
Tables Tablespaces Files File systems Logical Volumes Physical Volumes
Data Softech Inc. Oracle 10g ASM

ASM
Tables Tablespaces Automatic Storage Management

Disk Groups

Physical Volumes
4

Benefits of Automatic Storage Management


Provide efficient management of storage Provide integrated Cluster File system and Volume management capabilities No need for buggy OCFS or expensive 3rd Party CFS Provide Software Mirroring on top of vendor supplied SAN [2 or 3 Mirrors]

Triple Mirroring

Double Mirroring

No Mirroring

Data Softech Inc.

Oracle 10g ASM

Benefits of Automatic Storage Management


Provide efficient management of storage Provide integrated Cluster File system and Volume management capabilities No need for buggy OCFS or expensive 3rd Party CFS Provide Software Mirroring on top of vendor supplied SAN [2 or 3 Mirrors] Automatic online re-organization of disk space for any new addition/removal of storage capacity Disk Group

Data Softech Inc.

Oracle 10g ASM

Benefits of Automatic Storage Management


Automatic IO load balancing as data is striped across disks and better performance Available for both Single Instance as well as RAC instance Free built in 10g kernel Available even in Standard Edition Prevents Fragmentation and hence no need to relocate data to reclaim space Overcomes file system size limitations Prevents accidental file deletion Backup with RMAN

Data Softech Inc.

Oracle 10g ASM

ASM Components
DATABASE
ASM DISK GROUP

TABLESPACE

DATAFILE

ASM FILE

SEGMENT
FILE SYSTEM FILE Or RAW DEVICE

ASM DISK

EXTENT

ALLOCATION UNIT

ORACLE BLOCK

PHYSICAL BLOCK

ASM Disk ASM Disk ASM Disk

Data Softech Inc.

Oracle 10g ASM

Pre-Requisite for ASM


Need CSS daemon for creating an ASM instance
$ ps ef | grep css 1. In RAC, it is done by Oracle CLusterware 2. In Single Instance environment, you have to run # $ORACLE_HOME/bin/localconfig add To reconfigure the CSS daemon to run from the new Oracle home: # $ORACLE_HOME/bin/localconfig reset $ORACLE_HOME

Need Additional at least 100M of memory for ASM instance

Data Softech Inc.

Oracle 10g ASM

ASM Architecture
Node 1 DB Instance
PMON RBAL DBWR SMON LGWR ASMB LGWR DBWR SMON PMON GMON RBAL Group Services +ASM1-->DG1 +ASM1 -->DG2
O C S S D O C S S D

Node 2
Group Services +ASM2-->DG1 +ASM2 -->DG2 +ASM2 -->DG3 ARB0 ARBa LGWR DBWR GMON RBAL SMON PMON

DB Instance
SMON LGWR ASMB PMON RBAL DBWR

FG

ASM Instance +ASM1

ARB0 ARBa

FG FG

DB Instance
ASMB SMON LGWR PMON RBAL DBWR

ASM Instance +ASM2

ASM Disk ASM Disk DG1 Disk Group


Data Softech Inc.

ASM Disk ASM Disk DG2 Disk Group


Oracle 10g ASM

ASM Disk ASM Disk ASM Disk DG3 Disk Group


10

ASM Components
ASM Instance ASM Disk Disk Group Failure Group ASM Files

Data Softech Inc.

Oracle 10g ASM

11

ASM Components
ASM Instance ASM Disk Disk Group Failure Group ASM Files

Data Softech Inc.

Oracle 10g ASM

12

ASM Components ASM Instance


10g has two types of Instance INSTANCE_TYPE = asm INSTANCE_TYPE = rdbms [Default] Feature of ASM instance Do not mount the database but manage metadata required to make ASM files available for DB instances DB Instance access ASM files directly and contact ASM instance only for the layout of ASM files Smaller than DB instance < 100M Contains no physical files like log files / control files or data files Requires only the init.ora file for startup Instance Name is +ASM or +ASM1..n [RAC] ASM Instance DB Instance

Data Softech Inc.

Oracle 10g ASM

13

ASM Components ASM Instance


ASM instance have no user dictionary and so only way to connect is OS authentication with SYSDBA or SYSOPER privileges
SYSDBA
ALL SYSOPER as on RHS And

SYSOPER
STARTUP/SHUTDOWN ALTER DISKGROUP MOUNT/DISMOUNT ALTER DISKGROUP ONLINE/OFFLINE DISK ALTER DISK REBALANCE ALTER DISKGROUP CHECK Access to all V$ASM_* views

ASM Instance CREATE DISKGROUP ADD/DROP/RESIZE DISK S G A


ARB0 ARBa LGWR DBWR SMON PMON GMON RBAL

ALL Operations

Non-Destructive Operations

ASM Disk Group ASM Disk ASM Disk ASM Disk

Data Softech Inc.

Oracle 10g ASM

14

ASM Components ASM Instance


Database Configuration Assistant Manual using SQL Oracle Universal Installer

SQL> startup pfile=init+ASM.ora

Data Softech Inc.

Oracle 10g ASM

15

ASM Components ASM Instance


Starting an ASM instance using STARTUP command
MOUNT | OPEN NOMOUNT FORCE RESTRICT
Mount the Disk Group as per ASM_DISKGROUPS setting Start the Instance but ignore ASM_DISKGROUPS setting Perform SHUTDOWN ABORT to ASM before Restarting Prevents DB instances connecting to the ASM instance

Shutting down and ASM instance using SHUTDOWN command


NORMAL IMMEDIATE TRANSACTIONAL ABORT
ASM instance wait until all SQL running in any connected DB instance are complete before dismounting any Disk Group ORA-15097 : Cannot SHUTDOWN ASM instance with 10g R2 Connected RDBMS instance Shutdown ASM instance immediately without orderly Dismounting Disk Group. All connect DB instances also aborts

Data Softech Inc.

Oracle 10g ASM

16

ASM Components ASM Instance


$ sqlplus /nolog SQL> connect / as sysdba Connected to an Idle instance SQL> startup ASM instance started Total System Global Area Fixed Size Variable Size ASM Cache ASM diskgroups mounted 79691776 bytes 1247396 bytes 53278556 bytes 25165824 bytes

Data Softech Inc.

Oracle 10g ASM

17

ASM Components DB Instance


At least 600 K to LARGE_POOL_SIZE At least 25 +15n to PROCESSES where n is no. of DB Instance Add the following Megabyte to SHARED_POOL_SIZE based on ASM mirroring and Total Database size
External Redundancy ( dp_space / 100 +2 ) Normal Redundancy ( dp_space / 50 +4 ) High Redundancy ( dp_space / 33 +6 )

NOTE : If you are using AMM, then ignore the above settings.

Data Softech Inc.

Oracle 10g ASM

18

ASM Components ASM Instance


ASM Instance init.ora parameters
*.asm_diskgroups='DG_LOG','DG_DATA *.asm_diskstring=/dev/rdsk/c* *.instance_type='asm *.asm_power_limit=1 *.large_pool_size=12M *.remote_login_passwordfile='SHARED' *.user_dump_dest='/oracle/product/admin/+ASM/udump *.background_dump_dest='/oracle/product/admin/+ASM/bdump *.core_dump_dest='/oracle/product/admin/+ASM/cdump'

ASM Instance Binaries


Use same ORACLE_HOME for ASM and DB Instance , if there is only one DB instance Use separate ORACLE_HOME for ASM instance if it supports several database instances

Data Softech Inc.

Oracle 10g ASM

19

ASM Components ASM & DB Instance


Three New Background Process for ASM instance
asm_rbal_+ASM 10g R2 asm_gmon_+ASM asm_arb0_+ASM -- Co-ordinate rebalance activity for Disk Group -- Disk Group Monitor Process -- Perform Actual rebalance using Data extent movement -- ARB0 ARBa depending ASM_POWER_LIMIT setting

Two New Background Process for DB instance


-- performs global opens of the disk in the Disk groups -- Connects to Foreground process in ASM instance to receive periodic updates and verify that both ASM and DB instance are healthy. Database instances are allowed to connect to only one ASM instance at a time and hence they have at most one ASMB process ora_rbal_TEST asm_asmb_TEST

Data Softech Inc.

Oracle 10g ASM

20

ASM Components
ASM Instance ASM Disk Disk Group Failure Group ASM Files

Data Softech Inc.

Oracle 10g ASM

21

ASM Components ASM Disks


It is first task in ASM environment to discover and add Disks to ASM management In 10g Rel 2, Disk names are unique within Disk Group while in Rel 1 it is unique within ASM instance.
SQL> CREATE DISKGROUP data_dg1 EXTERNAL REDUNDANCY DISK /dev/dsk/sdc4,/dev/dsk/sdd4; SQL> SELECT name FROM v$asm_disk; Name DATA_DG1_0000 DATA_DG1_0001

Disk Selection for Disk Group


The disk must not have a pre-existing ASM header The disk cannot have an Oracle File header The disk is not already part of another Disk group The above validation prevents ASM from destroying any In use data device

Adding Disks to Disk Groups


Check if disk is usable Format the disk Rebalance the Disk group
Data Softech Inc. Oracle 10g ASM

Disk Group
ASM Disk ASM Disk ASM Disk

22

ASM Components ASM Disks

FOREIGN CANDIDATE PROVISIONED FORMER MEMBER


Data Softech Inc.

Means Disk is of Oracle Object but can only be added to disk group with FORCE keyword Means Disk is available to be added to any disk group Same as CANDIDATE except that Disk is configured using ASMLIB Means Disk was formerly part of some disk group Means Disk is already part of existing disk group Oracle 10g ASM 23

ASM Components ASM Disks


ASM separate files into extent and divides the extent for each file evenly across all of the disks

Disk or LUN

Database Files
AU are part of only one file Span multiple ASM disks A file can only exist in one ASM disk Group

Access Units

Disk Inputs Disks LUNS Partitions

ASM Disk

ASM provides 2 levels of Striping


COARSE 1 M, each AU is filled to 1M FINE 128K are written to each 1M AU and so each
AU has 8 pieces. Good for Logfiles
Oracle 10g ASM

Data Softech Inc.

24

ASM Components ASM Disks Configuration - Solaris


ASM with UNIX I/O:
Tablespaces are created on raw character devices managed by ASM using standard Linux I/O routines. # vi /etc/sysconfig/rawdevices /dev/raw/raw1 /dev/sdd1 /dev/raw/raw2 /dev/sdd2 /dev/raw/raw3 /dev/sdd3 # vi /etc/rc.d/rc.local chown oracle:dba /dev/raw/raw* chmod 660 /dev/raw/raw*

ASM with ASMLib I/O:


Tablespaces are created on raw block devices managed by ASM using ASMLib. Download ASMLIB rpm at http://www.oracle.com/technology/tech/linux/asmlib # rpm -Uvh oracleasm-support-2.0.1-1.x86_64.rpm # rpm -Uvh oracleasm-2.6.9-22.0.1.ELsmp-2.0.1-1.x86_64.rpm # rpm -Uvh oracleasmlib-2.0.1-1.x86_64.rpm Usage: /etc/init.d/oracleasm {start|stop|restart|enable|disable|configure|createdisk|deletedisk|querydisk|listdisks|scand isks| status} # /etc/init.d/oracleasm createdisk VOL1 /dev/sdb2 Marking disk "/dev/sdb2" as an ASM disk: [ OK ] Data Softech Inc. Oracle 10g ASM 25

ASM Components ASM Disks Configuration - Linux


Configuring ASM Disk
Create Partitions in Solaris and add them as disks in ASM Doc ID: 271621.1
# ls -lL c0t2d0s4 crw-r----- 1 root sys 32, 20 Feb 24 07:14 c0t2d0s4 This shows that the major and minor device number for this slice is 32,20 respectively. The 'c' at the beginning shows that this is a character (raw) special file. Let us create a directory to store these character special files: # mkdir asmdisk # cd asmdisk usage: mknod name [ b/c major minor ] [ p ] # mknod disk1 c 32 20 # ls -l crw-r--r-- 1 root other 32, 20 May 7 07:50 disk1 For this to be accessible to the ASM instance, we need to give oracle user permission to this file: # chown oracle:dba disk1 crw-r--r-- 1 oracle dba 32, 20 May 7 07:50 disk1 asm_diskstring =/asmdisk/disk1

# chown oracle:dba /dev/rdsk/c1t1d1s4 # asm_diskstring =/dev/rdsk/c1t1d1s4 Data Softech Inc. Oracle 10g ASM 26

ASM Components
ASM Instance ASM Disk Disk Group Failure Group ASM Files

Data Softech Inc.

Oracle 10g ASM

27

ASM Components ASM Disk Groups


It is collection of disks that can managed as logical unit. Easy to administer as number of Disk groups remains same while number of files and disks continually increases. After Disk group is created, metadata is stored in SGA on each disk header and include Creation data, Disk Group name and Redundancy type is stored in SGA and on each Disk header When you mount the Disk Group, ASM registers the following with CSS Disk Group name, Instance name Oracle Home Path DB instance use the above information to build TNS string to connect to ASM Instance A disk group can contain files from different DB Instances which can be on same or reside on different servers

Data Softech Inc.

Oracle 10g ASM

28

ASM Components ASM Disk Groups

Triple Mirroring

Double Mirroring

No Mirroring

Data Softech Inc.

Oracle 10g ASM

29

ASM Components ASM Disk Groups Creation


Database Configuration Assistant Oracle Universal Installer Manual using SQL
SQL> CREATE DISKGROUP data_dg1 EXTERNAL REDUNDANCY disk '/dev/raw/raw1','/dev/raw/raw2';

Enterprise Manager

Data Softech Inc.

Oracle 10g ASM

30

Disk Group Examples


Adding new disks to an existing ASM disk group. ALTER DISKGROUP data_dg1 ADD FAILGROUP ctlr3 DISK '/asmdisks/disk5' NAME dg_5 NOFORCE; Resizing an ASM disk group. ALTER DISKGROUP data_dg1 RESIZE ALL SIZE 200M; Resize all disks in a specific failure group ALTER DISKGROUP data_dg1 RESIZE DISKS IN FAILGROUP CTLR4 SIZE 48M; Check all disks in a specific disk group; don't repair them -- even if a problem is found ALTER DISKGROUP data_dg1 CHECK ALL NOREPAIR; Check a specific disk in a specific disk group, and repair the disk if needed ALTER DISKGROUP data_dg1 CHECK DISK dg_5 ; Manually rebalancing an ASM disk group ALTER DISKGROUP data_dg1 REBALANCE POWER 10; Mounting and dismounting ASM disk groups ALTER DISKGROUP data_dg1 DISMOUNT; ALTER DISKGROUP data_dg1 MOUNT; Drop just one disk ALTER DISKGROUP data_dg1 DROP DISK dg_5 ; "Undrop" a recently-dropped disk ALTER DISKGROUP data_dg1 UNDROP DISK dg_5 ;
Data Softech Inc. Oracle 10g ASM 31

Tablespace and Disk Group


SQL> CREATE TABLESPACE indy_data DATAFILE '+DATA_DG1' size 100M ;
Set the parameter DB_CREATE_FILE_DEST to +DATA_DG1 Examples: For the SID = DEVDB1 SQL> CREATE TABLESPACE indy_test_tblspc DATAFILE SIZE 100M ; +DATA_DG1/DEVDB1/datafile/indy_test_tblspc.299.121212129 SQL> CREATE TABLESPACE TEST100 DATAFILE '+DATADG1' size 100M ; +DATA_DG1/DEVDB1/datafile/indy_test_tblspc.300.121212129 SQL> CREATE TEMPORARY TABLESPACE TEMP1 TEMPFILE '+DATADG1/DEVDB1/datafile/temp2.tst' size 100M ; +DATA_DG1/DEVDB1/datafile/temp1.tst

Data Softech Inc.

Oracle 10g ASM

32

ASM Components
ASM Instance ASM Disk Disk Group Failure Group ASM Files

Data Softech Inc.

Oracle 10g ASM

33

ASM Components ASM Failure Groups


ASM provides internal redundancy and high availability by way of Failure groups It is also collection of disk and is considered as subset of disk group. Disk group redundancy can be Normal It is Two-way mirroring requiring at least two failure groups (default) High It is high degree Three-way mirroring requiring at least three failure groups Once a Disk group is created, its redundancy cannot be changed. The only way to change he redundancy is to create new Disk group with required redundancy and move the datafiles on it using RMAN restore or using DBMS_FILE_TRANSFER ASM does not mirror disks but it mirror extents. When ASM allocates primary extent (first extent) of a file to one disk in DG, its mirror copy of that extent to another disk in DG

Triple Mirroring

Double Mirroring

No Mirroring

Data Softech Inc.

Oracle 10g ASM

34

ASM Components
ASM Instance ASM Disk Disk Group Failure Group ASM Files

Data Softech Inc.

Oracle 10g ASM

35

ASM Files - Types


Fully Qualified ASM Filename: By default ASM automatically generates filename in the +group/dbname/file_type/file_type_tag.file.incarnation following form e.g. +ddg1/indydbn/controlfile/current.256.2195494

Def Template
ARCHIVELOG AUTOBACKUP BACKUPSET CHANGETRACKING CONTROLFILE DATAGUARDCONFIG DATAFILE DUMPSET FLASHBACK ONLINELOG PARAMETERFILE TEMPFILE XTRANSPORT
Data Softech Inc.

FileType
archive_log autobackup backupset changetracking controlfile drc datafile dumpset rlog
online_log

FileTypeTAG
Thread_thread#_seq_seq#

Def Striping
COARSE COARSE COARSE COARSE FINE COARSE COARSE COARSE FINE
FINE

Client Specified Client Specified ctf Current | Backup Db_unique_name <ts_name>_<file#> User_obj#_file# log_<log#> Group_<group#> spfile <ts_name>_<file#> tsname
Oracle 10g ASM

init
temp

COARSE
COARSE

COARSE
36

ASMCMD Command Line Interface


cd rm mkalias
$ export ORACLE_SID=+ASM $ asmcmd help

du

lsct

rmalias pwd ls

lsdg

find

Data Softech Inc.

Oracle 10g ASM

37

ASMCMD Examples
$ export ORACLE_SID=+ASM $ asmcmd ASMCMD> ls -ltr State Type Rebal Unbal Name MOUNTED EXTERN N N DG_DATA/ ASMCMD> cd DG_DATA ASMCMD> ls -ltr Type Redund Striped Time Sys Name Y DEVPROF/ ASMCMD> cd DEVPROF

ASMCMD> ls -ltr
Type Redund Striped Time Sys Y Y Y Y Y Y Y Name ARCHIVELOG/ CONTROLFILE/ DATAFILE/ DUMPSET/ ONLINELOG/ PARAMETERFILE/ TEMPFILE/ Name Current.1326.591118473 Current.263.590674673 Current.264.590674673

ASMCMD> ls -ltr CONGTROLFILE Type Redund Striped Time Sys CONTROLFILE UNPROT FINE MAY 22 15:00:00 Y CONTROLFILE UNPROT FINE MAY 22 15:00:00 Y CONTROLFILE UNPROT FINE MAY 22 15:00:00 Y

Data Softech Inc.

Oracle 10g ASM

38

ASM Dictionary Views


ASM Views
V$ASM_CLIENT V$ASM_DISKGROUP V$ASM_DISKGROUP_STAT V$ASM_DISK V$ASM_DISK_STAT V$_ASM_FILE V$_ASM_OPERATION V$_ASM_ALIAS

ASM Instance
Row for each DB Instance using Disk group Managed by ASM instance Row for all Disk group discovered by the ASM instance Row for all disks discovered by ASM Instance even they are not part of any Disk group Row for all ASM file available in all disk group like online log, archived Data files, control file etc Row for every active ASM long running Operation in an ASM instance Row for every alias present in all mounted Disk group

DB Instance
Row for each Disk Group used by DB Instance Row for all disk group mounted or dismounted Row for disks in the disk group in use by DB instance No rows

No rows

No rows

Data Softech Inc.

Oracle 10g ASM

39

File System to ASM Migration


Using EM Using RMAN Manually Using DBMS_FILE_TRANSFER Using XMLDB

Data Softech Inc.

Oracle 10g ASM

40

File System to ASM Migration


Using EM
Using RMAN Manually Using DBMS_FILE_TRANSFER Using XMLDB

Data Softech Inc.

Oracle 10g ASM

41

Moving from File System to ASM - EM


It uses RMAN for the movement Job is scheduled using DBMS_SCHEDULER

Data Softech Inc.

Oracle 10g ASM

42

File System to ASM Migration


Using EM

Using RMAN Manually


Using DBMS_FILE_TRANSFER Using XMLDB

Data Softech Inc.

Oracle 10g ASM

43

Moving from File System to ASM - MANUAL


Database Migration
Create an ASM instance Create the Required Disk Groups Setup OMF parameters Perform RMAN steps
Backup as copy database format +DiskGroup Switch Database to copy

Recreate Temp files Drop and recreate Online Redo log groups to ASM

Tablespace Migration
Take tablespace offline Backup copy of tablespace to ASM using RMAN Switch the Tablespace to ASM using RMAN Bring the Tablespace online
Data Softech Inc.

SPFILE Migration
Create PFILE Create SPFILE in required disk Group Edit $OH/dbs/init+ASM.ora and add SPFILE=dg_path specified in step 2
44

Oracle 10g ASM

File System to ASM Migration


Using EM Using RMAN Manually

Using DBMS_FILE_TRANSFER
Using XMLDB

Data Softech Inc.

Oracle 10g ASM

45

DBMS_FILE_TRANSFER and ASM


File System to ASM
10g R2

File System ASM to File System

DBMS_FILE_TRANSFER

ASM Disk

10g R2

ASM Disk ASM to ASM ASM Disk

DBMS_FILE_TRANSFER

File System

DBMS_FILE_TRANSFER

ASM Disk

COPY_FILE GET_FILE PUT_FILE Note :

Read Local File and copy it to new location on local system Contact Remote DB to read Remote file and copy it to Local system Read Local File and contact Remote DB to copy it to remote system

This operation can be performed directly without having to convert the datafile It will only be used for Database files like Datafile, tempfiles,controlfiles etc Oracle 10g ASM 46

Data Softech Inc.

DBMS_FILE_TRANSFER Example
SQL> CREATE DIRECTORY NonASM AS '/export/home/oracle/data' ; Directory created. SQL> CREATE DIRECTORY ASM_D AS as '+DATAD_G1/DEVPROF' ; Directory created. SQL> begin 2 DBMS_FILE_TRANSFER.COPY_FILE( 3 source_directory_object => ASM_D' , 4 source_file_name => 'spfiledevprof.ora' , 5 destination_directory_object => NonASM' , 6 destination_file_name => 'spfileDEV.ora'); 7 end ; 8 / PL/SQL procedure successfully completed.

Data Softech Inc.

Oracle 10g ASM

47

File System to ASM Migration


Using EM Using RMAN Manually Using DBMS_FILE_TRANSFER

Using XMLDB

Data Softech Inc.

Oracle 10g ASM

48

ASM and XMLDB


SQL> CREATE DIRECTORY test_asm as +DG_DATA; SQL> GRANT READ,WRITE ON DIRECTORY test_asm TO indy; $ expdp indy/indy DUMPFILE=test_asm:indy.dmp nologfile=y . $ export ORACLE_SID=+ASM $ asmcmd ASMCMD> cd DG_DATA ASMCMD> ls prof.dmp=>+DG_DATA/DEVPROF/DUMPSET/PROFNETSYS_EX PORT_TABLE_01_54652_1.1332.59266069 SQL> select dbms_xdb.cfg_get "xdbconfig.xsd" from dual; SQL>declare newconfig XMLType; begin --ftp port setting select updatexml( dbms_xdb.cfg_get(),'/xdbconfig/sysconfig/protocolconfig/ftpconfig/ftp-port/text()',6010) into newconfig from dual; dbms_xdb.cfg_update(newconfig); --http port setting select updatexml( dbms_xdb.cfg_get(),'/xdbconfig/sysconfig/protocolconfig/httpconfig/httpport/text()',6020) into newconfig from dual; dbms_xdb.cfg_update(newconfig); end; Data Softech Inc. Oracle 10g ASM 49

ASM and XMLDB


Cannot logon as SYS to view /sys/asm Need DBA privileges to view /sys/asm Cannot put regular files under /sys/asm

$ ftp indy.prnewswire.com 6010 Name (indy.prnewswire.com:oracle): system Password: FTP> cd sys/asm/DG_DATA FTP> binary FTP> get prof.dmp Local : prof.dmp remote: prof.dmp 250 BIN Data Connection 336 BIN Transfer Complete FTP> quit Data Softech Inc. Oracle 10g ASM 50

EM Home Page ..

Data Softech Inc.

Oracle 10g ASM

51

EM Home Page ..

Data Softech Inc.

Oracle 10g ASM

52

EM Home Page ..

Data Softech Inc.

Oracle 10g ASM

53

EM Home Page ..

Data Softech Inc.

Oracle 10g ASM

54

EM Monitoring Metrics

Data Softech Inc.

Oracle 10g ASM

55

Final Thoughts .
Go with Oracle 10g Release 2 on production for ASM environment Work on the following for backup as well data files movement RMAN XMLDB DBMS_FTP_TRANSFER You need ASM on Standby ( Physical ) location, if the Primary database is using ASM If you are on Linux, then use ASMLIB with ASM

Data Softech Inc.

Oracle 10g ASM

56

Misc. Tips #1
Oracle ASM webpage: http://www.oracle.com/technology/products/database/asm/index.html Upgrade ASM using Metalink 329987.1 Re-creating ASM Instances and Diskgroups Doc ID: Note:268481.1 How To Reclaim Asm Disk Space? Doc ID: Note:351866.1 How to Re-configure Asm Disk Group? Doc ID: Note:331661.1 How to Move Asm Database Files From one Diskgroup To Another ? Doc ID: Note:330103.1 Tuning Oracle Database 10g on Linux Using ASM, Bert Scalzo, 2006, http://www.oracle.com/technology/oramag/webcolumns/2003/techarti cles/scalzo_asm.html Oracle Database 10g Release 2 Automated Storage Management Overview and Technical Best Practices, Nitin Vengurlekar, Oracle Corporation 2005

Data Softech Inc.

Oracle 10g ASM

57

Misc. Tips #2
ASM Metadata
It is stored in all ASM Disks header and contain information Disk group name Physical size of all Disks in the Disk Group Allocation Unit (AU) Size Disk Own Size Failure Group Name of Disk Creation Date Redundancy Type Metadata is also stored as ASM file on ASM disks. These Files are internal to data and has file_number less than 256. This is the reason when creating Database on ASM have SYSTEM datafile as file_number as 256 and onwards Metadata is always mirrored across three disk ( if Available) even you are choosing EXTERNAL REDUNDACY. Metadata is also stored in SGA of Database Instance copied by ASMB
Data Softech Inc. Oracle 10g ASM 58

QUESTIONS ANSWERS

THANKS

Data Softech Inc.

Oracle 10g ASM

60

You might also like