Skip to content

Oracle – Recyclebin

This will take into account subsequent sessions – without the DEFERRED option, the command will fail alter system set recyclebin=OFF DEFERRED SCOPE=BOTH; ———————————————————————— PURGE RECYCLEBIN; To remove all dropped objects from the recyclebin (system wide):… 

Oracle – Sessions using TEMP tablespace

SELECT b.TABLESPACE , b.segfile# , b.segblk# , ROUND ( ( ( b.blocks * p.VALUE ) / 1024 / 1024 ), 2 ) size_mb , a.SID , a.serial# , a.username , a.osuser , a.program , a.status… 

Oracle – Shrink Tablespace

ALTER TABLESPACE temp SHRINK SPACE KEEP 3G VIEWS: v$tempfile V_$TEMP_SPACE_HEADER DBA_TEMP_FILES DBA_TABLESPACE_USAGE_METRICS

Oracle – Table Import Progress

select substr(sql_text,instr(sql_text,’INTO “‘),30) table_name, rows_processed, round((sysdate-to_date(first_load_time,’yyyy-mm-dd hh24:mi:ss’))*24*60,1) minutes, trunc(rows_processed/((sysdate-to_date(first_load_time,’yyyy-mm-dd hh24:mi:ss’))*24*60)) rows_per_min from sys.v_$sqlarea where sql_text like ‘INSERT %INTO “%’ and command_type = 2 and open_versions > 0;select substr(sql_text,instr(sql_text,’INTO “‘),30) table_name, rows_processed, round((sysdate-to_date(first_load_time,’yyyy-mm-dd hh24:mi:ss’))*24*60,1) minutes, trunc(rows_processed/((sysdate-to_date(first_load_time,’yyyy-mm-dd… 

Oracle v$sqlarea

select substr(sql_text, 1, 100), PHYSICAL_READ_REQUESTS, PHYSICAL_READ_BYTES, executions, last_load_time from v$sqlarea order by last_load_time desc