set lines 200 col "file_name" format a30 col "tablespace" format a30 set trimspool on spool duplicates.lst alter session set nls_language='american'; select t.name "tablespace", trim( substr(f.name, (instr(f.name,'/', -1, 1) +1) ) ) "file_name", count(*) from v$datafile f join v$tablespace t on (f.ts# = t.ts#) group by t.name, trim( substr(f.name, (instr(f.name,'/', -1, 1) +1) ) ) having count(*) > 1; exit
Minimalistic Oracle contains a collection of practical examples from my encounters with Oracle technologies. When relevant, I also write about other technologies, like Linux or PostgreSQL. Many of the posts starts with "how to" since they derive directly from my own personal experience. My goal is to provide simple examples, so that they can be easily adapted to other situations.
Friday, February 5, 2021
Find duplicate file names
You can find duplicate file names, on different file systems, by using this query:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment