Database Blog

ORA-20005: object statistics are locked (stattype = ALL) – Solution

During tuning a query, I found one table has stale statistics. While running gather stats for that table, got below error. Let me demonstrate with a demo table: SQL> execute…

Read More

SSD script

— Find segments with most read operations, and hopefully relatively few writes — These are good candidates for placing on SSD storage WITH segment_stats           AS…

Read More

check and kill

— Check what the sessions in our instance are waiting for select event,count(*) from v$session group by event order by count(*); — Flexible query to check what’s currently running in…

Read More

TFSCLOCK

SET ECHO off REM NAME:   TFSCLOCK.SQL REM USAGE:”@path/tfsclock” REM ———————————————————————— REM REQUIREMENTS: REM    SELECT on V_$LOCK, V_$SESSION, SYS.USER$, SYS.OBJ$ REM ———————————————————————— REM PURPOSE: REM    The following locking information…

Read More

Start workflow services from backend

Get the component id from below command col component_name for a20; col COMPONENT_STATUS for a20; select COMPONENT_NAME, COMPONENT_STATUS,Component_Id from fnd_svc_components; To start the services from back end – connect to…

Read More

Get standard view definition details

Sometime you wonder about the standard oracle views that where it gets information.  Also, you might be interested in getting base table information so that you can write your own…

Read More

Last added datafile in Oracle

Below query will give you the last added datafile in oracle. This will be useful to check whenever you have datafile related issues. DBA_HIST_DATAFILE is the view stores information of…

Read More

Shrink datafile with free space beyond high water mark

There are times where we need to clear the space of the mount point when the database grows. Sometimes, we run out of space and we may need to wait…

Read More

Unzip particular file from an zip file

Sometimes we would know the archive file present in zip folder and would like to unzip only that particular file.  The ‘-j’ option help us to achieve the same. Lets…

Read More

How to Tar excluding few sub directories

Many of us would have perform tar of directories for cloning/file movement between the servers.  Many times we would have think to exclude some sub-directories which are not needed, so…

Read More