Apologies if this is a stupid question but I can't get my head around this. I often get request from client to drop few disks from Diskgroup.
So In this process - I want to generate a dynamic sql from v$asm_disk
, v$asm_diskgroup
.
SQL:
select d.path, d.FAILGROUP,d.os_mb/1024 GB
from v$asm_disk d, v$asm_diskgroup dg
where d.group_number = dg.group_number and dg.name='Test_archive'
order by DISK_GROUP_NAME;
The dynamic sql OUTPUT should look like below :
ALTER DISKGROUP Test_archive DROP DISK mnc1, mnc2, mnc3;
Could you please let me know how to achive the above output?