2014/05/23

Published 5月 23, 2014 by

DB File/Tablespace Size Monitor

查看每個File的使用率 SELECT T.TABLESPACE_NAME,D.FILE_NAME,D.AUTOEXTENSIBLE,D.BYTES/1024/1024/1024 as USED_G,D.MAXBYTES/1024/1024/1024 AS MAX_G,D.STATUS,(d.bytes/d.maxbytes)*100 AS UseRate FROM DBA_TABLESPACES T,DBA_DATA_FILES D WHERE T. TABLESPACE_NAME =D. TABLESPACE_NAME and d.maxbytes!=0 ORDER BY UseRate desc 查看Tablespace的平均使用率及剩餘空間 select t.tablespace_name ,avg(d.bytes/d.maxbytes)*100 as Used_Rate,sum(d.maxbytes)/1024/1024/1024...
Read More

2014/05/16

Published 5月 16, 2014 by

DB常用指令

Create Function: CREATE INDEX DWPIA.IDX_SAP_STB_MTIDX ON DWPIA.SAP_STB (MTIDX, RDATE) LOGGING TABLESPACE DWC5_IDX NOPARALLEL online; CREATE TABLESPACE C5_SYS_DATA DATAFILE '+DBDATA/c5tasm/datafile/C5_SYS_DATA.dbf' SIZE 5M AUTOEXTEND ON NEXT 5M MAXSIZE UNLIMITED; CREATE USER C5TST3 IDENTIFIED BY C5TST3 ACCOUNT UNLOCK; Drop Function: DROP TABLESPACE tspace INCLUDING CONTENTS AND DATAFILES; Grant...
Read More

2014/05/07

Published 5月 07, 2014 by

Oracle ASM To File File::DBMS_FILE_TRANSFER

Oracle ASM To File File::DBMS_FILE_TRANSFER 建立Directory: SQL> create directory souredir as '+DBDATA/c5tasm/datafile'; SQL> create directory destdir as '/orasys'; Directory created 確認directories: SQL>select * from dba_directories; 確認File的Status: SQL>select file_name,...
Read More