Friday, October 29, 2010

Script to detect duplicate file names in different filesystems.

select substr(file_name, instr(file_name,'/',1,5)+1), count(*)
from dba_data_files
group by substr(file_name, instr(file_name,'/',1,5)+1)
having count(*) > 1;