[ 2014-11-10 ]

ASM: Where is my data?

Sometimes we want to know where exactly is a particular database block - on which ASM disk, in which allocation unit on that disk and in which block of that allocation unit. In this post I will show how to work that out.


Database instance


In the first part of this exercise I am logged into the database instance. Let's create a tablespace first.


SQL> create tablespace T1 datafile '+DATA';

Tablespace created.


SQL> select f.FILE#, f.NAME "File", t.NAME "Tablespace"
from V$DATAFILE f, V$TABLESPACE t
where t.NAME='T1' and f.TS# = t.TS#;


FILE# File                               Tablespace
----- ---------------------------------- ----------
   6  +DATA/br/datafile/t1.272.797809075 T1

Note the ASM file number is 272.



No hay comentarios:

Publicar un comentario