forked from abdulirfan3/Oracle_SQL_Scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatafile.sql
More file actions
22 lines (22 loc) · 692 Bytes
/
Copy pathdatafile.sql
File metadata and controls
22 lines (22 loc) · 692 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- for data files
-- CHECK FOR SPECIFIC TABLESPACE AND DATAFILE
prompt GIVE ONE TABLESPACE NAME OR HIT ENTER FOR ALL TABLESAPCE
set pages 999 feed on newpage 1
col tblspace for a15 trunc
col file_name for a50 trunc
col status for a5 trunc
col extbl for a5 trunc
col MB for 999,999
col maxMB for 999,999
select b.tablespace_name tblspace,
a.file_name,
a.file_id,
b.status,
a.autoextensible extbl,
(bytes/1024/1024) MB,
(maxbytes/1024/1024) MaxMB
from dba_data_files a,
dba_tablespaces b
where a.tablespace_name = b.tablespace_name
and upper(b.tablespace_name) like upper(nvl('%&tbsp%',b.tablespace_name))
order by 1, 2;