V$DATAFILE
displays datafile information from the control file.
Column | Datatype | Description |
|
| File identification number |
|
| Change number at which the datafile was created |
|
| Timestamp of the datafile creation |
|
| Tablespace number |
|
| Tablespace relative datafile number |
|
| Type of file (system or user) and its status. Values: |
|
| Describes how accessible the file is from SQL: · · · · |
|
| SCN at last checkpoint |
|
| Timestamp of the checkpoint# |
|
| Last unrecoverable change number made to this datafile. If the database is in |
|
| Timestamp of the last unrecoverable change. This column is updated only if the database is in |
|
| Last change number made to this datafile (null if the datafile is being changed) |
|
| Timestamp of the last change |
|
| Offline change number of the last offline range. This column is updated only when the datafile is brought online. |
|
| Online change number of the last offline range |
|
| Online timestamp of the last offline range |
|
| Current datafile size (in bytes); |
|
| Current datafile size (in blocks); 0 if inaccessible |
|
| Size when created (in bytes) |
|
| Block size of the datafile |
|
| Name of the datafile |
|
| Describes whether the tablespace is plugged in. The value is |
|
| Offset from the beginning of the file to where the Oracle generic information begins. The exact length of the file can be computed as follows: |
|
| Auxiliary name that has been set for this file via |
|
| First nonlogged SCN |
|
| First nonlogged time |
|
| ??? |
|
| ??? |
|
| ??? |
|
| ??? |
|
| ??? |
|
| ??? |
|
| ??? |
Note:
- Script to generate the script for DBV
select 'dbv file=' || name || ' blocksize='|| block_size || ' logfile=' || substr(name, instr(name, '/', -1, 1) +1) || '.' || file# || '.log' from v$datafile; |
- Script to get database file I/O information
select name, phywrts, phyrds from v$datafile a, v$filestat b where a.file# = b.file# order by 1; |
- Script to list the details of database growth per month
select to_char(creation_time, 'RRRR Month') "Month", round(sum(bytes)/1024/1024/1024) "Growth in GB" from v$datafile where creation_time > SYSDATE-365 group by to_char(creation_time, 'RRRR Month'); |
select creation_time, name, round(bytes/1024/1024/1024, 1) size_GB from v$datafile where creation_time > SYSDATE-365 order by creation_time, name; |
- script to perform end backup on all datafiles
select 'alter database datafile ''' || name || ''' end backup;' from v$datafile d, v$backup b where d.file# = b.file# and b.status = 'ACTIVE'; |
Oracle data dictionary views
Oracle dynamic performance views
Last updated: July 28, 2009 |
No comments:
Post a Comment