Blocking sessions
Select blocking_session, sid, serial#, wait_class,
seconds_in_wait
From v$session
where blocking_session is not NULL
order by blocking_session;
Kill session:
ALTER SYSTEM KILL SESSION ’sid,serial#’ IMMEDIATE;
Regards,
Tom
Do you have any questions regarding Oracle?
Archive for November 2008
Select blocking_session, sid, serial#, wait_class,
seconds_in_wait
From v$session
where blocking_session is not NULL
order by blocking_session;
Kill session:
ALTER SYSTEM KILL SESSION ’sid,serial#’ IMMEDIATE;
Regards,
Tom
col “Database Size” format a20
col “Free space” format a20
col “Used space” format a20
select   round(sum(used.bytes) / 1024 / 1024 / 1024 ) || ‘ GB’ “Database Size”
,   round(sum(used.bytes) / 1024 / 1024 / 1024 ) -
round(free.p / 1024 / 1024 / 1024) || ‘ GB’ “Used space”
,   round(free.p / 1024 / 1024 / 1024) || ‘ GB’ “Free space”
from   (select   bytes
from   v$datafile
union   all
select   bytes
from    v$tempfile
union    all
select    bytes
from    v$log) used
,   (select sum(bytes) as p
from dba_free_space) free
group by free.p
/
Output:
Database Size       Used space          Free space
——————– ——————– ——————–
83 GBÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â 65 GBÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â 18 GB
Regards,
Tom
When trying to delete a database target through Grid Control, the following error occurs:
SQL> exec mgmt_admin.delete_target(’orcl’,'oracle_database’);
BEGIN mgmt_admin.delete_target(’orcl’,'oracle_database’);
END;
*
ERROR at line 1:
ORA-20238: Target orcl:oracle_database is currently in the process of being deleted ORA-06512:
at “SYSMAN.MGMT_ADMIN”, line 445
ORA-06512: at “SYSMAN.MGMT_ADMIN”, line 586
ORA-06512: at line 1
Solution
exec mgmt_admin.delete_target_internal(’orcl’,'oracle_database’);
More on metalink:
Note:376905.1
Note:419956.1
Regards,
Tom