Saturday, 14 December 2013

How to Kill Idle Session

    Consider a situation when DBA having some maintenance task. He has already passed the message to all the database user to stop using the database and he finds some of the users is still using the database and he is not able to communicate with that particular user (may be he is not available of chair) then DBA choose to kill that session. For this purpose either you can use Toad or run the below batch file.
declare
   ora_user varchar2(30) default 'HRMS'; --Oracle Username to kill all sessions for
begin
   execute immediate 'alter user '||ora_user||' account lock';
   for crs in (select sid,serial# from v$session where username = ora_user) loop
      execute immediate 'alter system kill session '''||crs.sid||','||crs.serial#||'''';
   end loop;
end;
/
How to Kill idle Session of particular Schema
Contents: kill_idle_sessions.bat
sqlplus orafin/**** @d:\kill_idle_sessions.sql

Contents: kill_idle_sessions.sql
connect / as sysdba
exec kill_idle_sessions
exit.

Wednesday, 11 December 2013

ORA-29913: error in executing ODCIEXTTABLEOPEN callout

ORA-29913: error in executing ODCIEXTTABLEOPEN callout

Yesterday I was worked in db migration to export the schema & import into another database.
I have faced some issues. I would like to share you.
Database version is 10.2.0.4 & server is IBM AIX 5.3. Schema size is around 25 GB. So I am using Datapump & got the below error.

ORA-31693: Table data object "MANOJ"."RB_TABLE" failed to load/unload and
is being skipped due to error:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-39077: unable to subscribe agent ORA-39077: unable to subscribe
agent KUPC$A_1_20101210

I have checked several URL & they told its related to external table. But my table is a normal table.
I got only error for "MANOJ"."RB_TABLE" & remaining tables were exported successfully.
I got parallel parameter having issue. While export using expdp I used parallel=6 parameter.
Again I have tried parallel =2, 3, 4 & got the same error.
Finally i set parallel=1 (default value – No need to mention while export using expdp) & exported successfully.

Note:

My server having 16 CPU’s & my database side parallel slave’s are available..