ITPub博客

首页 > 数据库 > Oracle > Script – Database structure and file location

Script – Database structure and file location

原创 Oracle 作者:pan_tian 时间:2014-07-02 16:36:16 0 删除 编辑

1.Control Files

set pagesize 500
set linesize 130
Prompt
Prompt Control Files Location >>>>
col name  format a60 heading "Control Files"

select name
from   sys.v_$controlfile
/

2.Redo Log Files
Prompt
Prompt Redo Log File Locations >>>>
Prompt

col Grp    format 9999
col member format a50 heading "Online REDO Logs"
col File#  format 9999
col name   format a50 heading "Online REDO Logs"
break on Grp
select group#,member
from   sys.v_$logfile
/
3.Data Files
Prompt Data Files Locations >>>>

col Tspace    format a25
col status    format a3  heading Sta
col Id        format 9999
col Mbyte     format 999999999
col name      format a50 heading "Database Data Files"
col Reads     format 99,999,999
col Writes    format 99,999,999

break on report
compute sum label \'Total(MB)\'  of Mbyte  on report

select F.file_id Id,
       F.file_name name,
       F.bytes/(1024*1024) Mbyte,
       decode(F.status,\'AVAILABLE\',\'OK\',F.status) status,
       F.tablespace_name Tspace
from   sys.dba_data_files F
order by tablespace_name;

<!-- Baidu Button BEGIN -->

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26687597/viewspace-1204944/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Cache Pattern
下一篇: Diagnostic Script for Concurrent Requests
请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2012-02-18

最新文章