-- =======================================================================
-- Use the V$RECOVER_FILE, V$DATAFILE, and V$TABLESPACE views
-- which data files are missing and which tablespaces they are associated
-- =======================================================================
SELECT
b.name ts_name,
a.error,
c.name datafile
FROM
v$recover_file a,
v$tablespace b,
v$datafile c
WHERE
a.file#=c.file#
AND b.ts#=c.ts#
TS_NAME ERROR DATAFILE
--------- ------------------- ------------------------------------
USERS FILE NOT FOUND C:\ORACLE\ORADATA\ORCL\USERS01.DBF