05 Table Space

Embed Size (px)

DESCRIPTION

ghg

Citation preview

find / -name *.aud -mtime +1 -exec rm {} ; Autofix Failure - Tablespace:SYSAUX :: Instance:VLEG1K :: Reference SR# 3-7490 199263 Customer Problem Description ============================ Target=PTXEBT_ldohstxeb001.oracleoutsourcing.com Host=ldohstxeb001.oracleoutsourcing.com Abnormal growth in Tablespace"EB_DATA". Thanks & Regards, Jayender. ORA-01652 -- TEMP =============================================================== Dear Customer, Added Data files to the tablespace "" and threshold has been cleared. Alert should clear during next EM collection. Placing under 'Solution Offered' and awaiting for EM to clear. @SO, Thanks, Jayender. Dear Customer, Added Data file to the tablespace "" and threshold has been cleared. Alert should clear during next EM collection. Placing under 'Solution Offered' and awaiting for EM to clear. @SO, Thanks, Jayender. There are no issues found. Alert should clear during next EM collection. No acti on required. Placing under 'Solution Offered' and awaiting for EM to clear. @SO, Thanks, Jayender. Alert should clear during next EM collection. Placing under 'Solution Offered' and awaiting for EM to clear./usr/local/git/bin/em-blackout-cmd -o list----To check Active Blockout List. ==========================================Dear Customer, As per undo advisory there D - 2,722 MB and no recent There are no issues found. on required. Placing under @SO, Thanks, Jayender. ================================================================================ ================================================ set lines 300 col FILE_NAME for a55 col TABLESPACE_NAME for a20 select * from (select a.FILE_NAME,a.TABLESPACE_NAME,a.bytes/1024/1024,a.maxbytes /1024/1024,a.autoextensible,b.CREATION_TIME from dba_data_files a, v$datafile b where a.FILE_NAME=b.name and a.TABLESPACE_NAME='&tbs' order by b.CREATION_TIME d esc ) where rownum select dbsnmp.mgmt_db_tbsp_max_size(85,9999,95,9999) from dual; DBSNMP.MGMT_DB_TBSP_MAX_SIZE(85,9999,95,9999) -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------WARNING COUNT: 1, WARNING LIST: FUSION_TS_TOOLS 87.59% 6857.63MBSince it is FUSION_TS_TOOLS tablespace we can check : od_fusionapps - channelselect dbsnmp.mgmt_db_tbsp_max_size(75,1843,85,1024) from dual;75,1843,85,1024 =========================================================================PRINCIPAL FINANCIAL GROUP =========================$ ps -ef |grep pmon srsrnair 13259 13200 0 21:59 pts/0 10001 18627 1 0 Jan31 ?00:00:00 grep pmon 00:40:24 ora_pmon_DRDRB010pbrun ohsdba -u ordrdrb010 SQL> select name from v$database; NAME --------DRDRB010threshold ========= odem2 login =========== User : ohsmon Pwd : welc0me ( note the 'Zero' not O ) select dbsnmp.mgmt_db_tbsp_max_size(75,50000,85,10000) from dual;Ref sr - 3-5430709531============================================================== EXADATA ======== Target=PSASCO-sasdbpr_sasdbpr1Host=sas1db01.sascar-dc.brchannel ======= oms_exadata Ref SR - 3-5327638456 - Maaz owned================================================================================ ===============Tablespace SR : 3-5999102195 ============================ Customer : Balfour Beatty Group Limited Syntax used : =============existing files ============== FILE_NAME YTES/1024/1024 A.MAXBYTES/1024/1024 AUT CREATION_ -------------------------------------------------------------------- -------------------- --- --------/tbab7i/oradata/data01/apps_ts_media.378.785423479 5000 5000 YES 08-JUN-12 /tbab7i/oradata/data01/apps_ts_media.379.777385071 5000 5000 YES 08-MAR-12 /tbab7i/oradata/data01/apps_ts_media.380.769276013 5000 5000 YES 07-DEC-11 /tbab7i/oradata/data01/apps_ts_media.330.761492691 5000 5000 YES 27-NOV-03 TABLESPACE_NAME A.B-------------------- --APPS_TS_MEDIA APPS_TS_MEDIA APPS_TS_MEDIA APPS_TS_MEDIASQL> alter tablespace APPS_TS_MEDIA add datafile '/tbab7i/oradata/data01/apps_ts _media.381.769276014' size 200M AUTOEXTEND ON NEXT 20M MAXSIZE 5000M; Tablespace altered. SQL> alter database backup controlfile to trace; Database altered.================================================================================ ================BIG DATAFILE ============= Please follow the instruction while handling the Big datafile tablespacequery to check Big datafile tablespaceselect Name,BIGFILE from v$tablespace where name='PCVO3O_IAS_IAU'; NAME BIG ------------------------------ --MSP_INDEX YES 1 row selected.about Big file tablespace =================== 1) it will contain only 1 datafile won't allow you to add more files 2)Unlike normal tablespace you can't just resize the datafile. For resizing data file useALTER TABLESPACE TSNAME RESIZE SIZE (M/G);(If no auto extend) alter tablespace RESULTS_CC_INDX AUTOEXTEND ON MAXSIZE 272384 M;(with Auto exten d)Ref sr ;-3-6142984659Query to capture Fragmentation Index ========================================================== SELECT tablespace, files, count_free_blocks,free_bytes, free_blocks, largest_bytes, largest_blks, percent_largeblk_total_freeblk, average_fsfi, case when average_fsfi < 30 then 'CRITICAL' when average_fsfi between 30 and 40 then 'High' else 'NONE' end alert_level FROM (SELECT tablespace, COUNT(*) files, SUM(count_free_blocks) count_free_blocks, SUM(free_bytes) free_bytes, SUM(free_blocks) free_blocks, SUM(largest_bytes) largest_bytes, SUM(largest_blks) largest_blks, SUM(largest_bytes)/sum(free_bytes)*100 percent_largeblk_total_freeblk, SUM(fsfi)/COUNT(*) average_fsfi FROM (SELECT tablespace_name tablespace, file_id, COUNT(*) count_free_blocks, SUM(bytes) free_bytes, SUM(blocks) free_blocks, MAX(bytes) largest_bytes, MAX(blocks) largest_blks, SQRT(MAX(blocks)/SUM(blocks))*(100/SQRT(SQRT(COUNT(blocks)))) fsfi FROM sys.dba_free_space where tablespace_name ='&TABLESPACE_NAME' GROUP BY tablespace_name, file_id, relative_fno) GROUP BY tablespace) / Query to capture Fragmentation Index for all the tablespace of a DB =================================================================== rem FUNCTION: Provide data on tablespace extent status rem FUNCTION: Use 0 = OK , 1= Warning , 2= Critical rem FUNCTION: includes fsfi from DBA Handbook rem SET FEED OFF SET FLUSH OFF SET VERIFY OFF set pages 65 LINES 150 set colsep | set tab off COLUMN tablespace HEADING Name FORMAT a26 COLUMN files HEADING '#Files' FORMAT 9,99 COLUMN pieces HEADING 'FREE_BLKS_PIECE' FORMAT 9,999,99 COLUMN free_bytes HEADING 'Free Byte' FORMAT 9,999,999,999,99 COLUMN free_blocks HEADING 'Free Blk' FORMAT 999,999,999 COLUMN largest_bytes HEADING 'Biggest Bytes' FORMAT 9,999,999,999,99 COLUMN largest_blks HEADING 'Biggest Blks' FORMAT 999,999,999 COLUMN ratio_maxbyte_totalfree HEADING 'FREE_BLK_PERCNT' FORMAT 999.999 COLUMN average_fsfi HEADING 'Average FSFI' FORMAT 999.999 COLUMN alert_level HEADING 'Alert level' FORMAT 99 SELECT tablespace, files, pieces, free_bytes, free_blocks,largest_bytes, largest_blks, ratio_maxbyte_totalfree, average_fsfi, case when average_fsfi < 30 then 'CRITICAL' when average_fsfi between 30 and 40 then 'HIGH' else 'NONE' end alert_level FROM (SELECT tablespace, COUNT(*) files, SUM(pieces) pieces, SUM(free_bytes) free_bytes, SUM(free_blocks) free_blocks, SUM(largest_bytes) largest_bytes, SUM(largest_blks) largest_blks, SUM(largest_bytes)/sum(free_bytes)*100 ratio_maxbyte_totalfree, SUM(fsfi)/COUNT(*) average_fsfi FROM (SELECT tablespace_name tablespace, file_id, COUNT(*) pieces, SUM(bytes) free_bytes, SUM(blocks) free_blocks, MAX(bytes) largest_bytes, MAX(blocks) largest_blks, SQRT(MAX(blocks)/SUM(blocks))*(100/SQRT(SQRT(COUNT(blocks)))) fsfi FROM sys.dba_free_space GROUP BY tablespace_name, file_id, relative_fno) GROUP BY tablespace having SUM(fsfi)/COUNT(*)