|
|
|
Re: Disk group used by database [message #620381 is a reply to message #620364] |
Thu, 31 July 2014 15:31 |
|
srikanth02
Messages: 49 Registered: June 2014 Location: India
|
Member |
|
|
Hi Blackswan,
I used following select query to find the path where the databases files for a particular database is stored,
but the output it has selected is 148 rows selected. say for example i want to find the path of database files for database 'A'
and i did select query from 'A' database.Does it mean database files of 'A' are stored in the following path ?
select name, path, header_status from v$asm_disk;
NAME PATH HEADER_STATUS
------------------------------ ------------------------------ ------------------------------------
HDS_K1_439A_39 /dev/raw/raw39 MEMBER
HDS_K2_4399_38 /dev/raw/raw38 MEMBER
HDS_K1_4399_37 /dev/raw/raw37 MEMBER
HDS_K2_4397_34 /dev/raw/raw34 MEMBER
HDS_K1_4397_33 /dev/raw/raw33 MEMBER
HDS_K2_4396_32 /dev/raw/raw32 MEMBER
HDS_K1_4396_31 /dev/raw/raw31 MEMBER
HDS_K2_4395_30 /dev/raw/raw30 MEMBER
HDS_K1_4395_29 /dev/raw/raw29 MEMBER
HDS_K2_4394_28 /dev/raw/raw28 MEMBER
HDS_K1_4394_27 /dev/raw/raw27 MEMBER
HDS_K2_4393_26 /dev/raw/raw26 MEMBER
HDS_K1_4393_25 /dev/raw/raw25 MEMBER
HDS_K2_4392_24 /dev/raw/raw24 MEMBER
HDS_K1_4392_23 /dev/raw/raw23 MEMBER
HDS_K2_4391_22 /dev/raw/raw22 MEMBER
HDS_K1_4391_21 /dev/raw/raw21 MEMBER
HDS_K2_438F_18_ODMMES /dev/raw/raw18 MEMBER
HDS_K1_438F_17_ODMMES /dev/raw/raw17 MEMBER
Could you please clarify it?
Regards,
Srikanth
[Updated on: Thu, 31 July 2014 15:33] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Disk group used by database [message #620469 is a reply to message #620399] |
Fri, 01 August 2014 13:54 |
|
srikanth02
Messages: 49 Registered: June 2014 Location: India
|
Member |
|
|
Hi Babu,
Welcome back ! Nice to see you in my thread.
With help of the query you provided i could find which diskgroup the database files are writing to as below
SELECT SUBSTR(d.name,1,16) AS asmdisk, d.mount_status, d.state,
dg.name AS diskgroup FROM V$ASM_DISKGROUP dg, V$ASM_DISK d
WHERE dg.group_number = d.group_number;
ASMDISK MOUNT_STATUS STATE DISKGROUP
------------------------------ --------------------- ------------------------ ------------------------------
HDS_K2_43B5_94 CACHED NORMAL MDAS_DATA01
HDS_K1_43B5_93 CACHED NORMAL MDAS_DATA01
HDS_K2_43B4_92 CACHED NORMAL MDAS_DATA01
HDS_K1_43B4_91 CACHED NORMAL MDAS_DATA01
And to find the path of disk groups i used the following query.
select group_number,name,path,total_mb,free_mb from v$asm_disk
where group_number in (select group_number from v$asm_diskgroup
where name in ('MDAS_DATA01'));
GROUP_NUMBER NAME PATH TOTAL_MB FREE_MB
------------ ------------------------------ ------------------------------ ---------- ----------
3 HDS_K1_43C2_119 /dev/raw/raw119 102396 17500
3 HDS_K2_43C1_118 /dev/raw/raw118 102396 17472
3 HDS_K1_43C1_117 /dev/raw/raw117 102396 17456
3 HDS_K2_43C0_116 /dev/raw/raw116 102396 17348
3 HDS_K1_43C0_115 /dev/raw/raw115 102396 17528
Can you check the above output and confirm the query i used is correct ?
Regards,
Srikanth
|
|
|
|
Re: Disk group used by database [message #620473 is a reply to message #620361] |
Fri, 01 August 2014 15:27 |
John Watson
Messages: 8963 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
Quote:Can you tell how to find out disk groups and their path used by particular database You need to connect to the ASM instance (not an RDBMS instance) and query v$asm_client. That will tell you which instances are using which disk groups.
|
|
|
Re: Disk group used by database [message #620475 is a reply to message #620473] |
Fri, 01 August 2014 16:38 |
|
srikanth02
Messages: 49 Registered: June 2014 Location: India
|
Member |
|
|
Hi all,
Here is my findings.
I altered the query and some how manage to get the output i wanted.But the below sql query returned 510 rows.
I suspect the query is wrong.
Can you check and confirm whether the query i used is correct ?
SQL> l
1 SELECT f.name as diskgroup,dg.path AS location, SUBSTR(c.instance_name,1,12) AS instance,
2 SUBSTR(c.db_name,1,12) AS dbname, SUBSTR(c.SOFTWARE_VERSION,1,12) AS software
3 FROM v$asm_disk dg, V$ASM_CLIENT c,v$asm_diskgroup f
4 WHERE dg.group_number = c.group_number
5* and DB_NAME='DMRS'
DISKGROUP LOCATION INSTANCE DBNAME SOFTWARE
---------------------- ------------------------------ -------------------- ------------------------ -------------------------
MCPMES_DATA01 /dev/raw/raw130 DMRS DMRS 11.2.0.4.0
ISPMES_FRA /dev/raw/raw130 DMRS DMRS 11.2.0.4.0
ISPMES_DATA01 /dev/raw/raw130 DMRS DMRS 11.2.0.4.0
ODMMES_DATA01 /dev/raw/raw130 DMRS DMRS 11.2.0.4.0
-
-
-
-
and so on.
Regards,
Srikanth
[Updated on: Fri, 01 August 2014 19:52] Report message to a moderator
|
|
|
|
|
|