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..

Friday, 22 November 2013

ORA-00406: COMPATIBLE parameter needs to be 10.0.0.0.0 or greater

Recently I was worked on UAT Database migration from one server to another new server. Once I got a request I have checked the space requirements and  other checklist details on new server also. I felt everything looks good.

During scheduled time, I started the RMAN online backup with compression option because I have less space for backup location. Also I don’t have any other file system to place the RMAN backup.

While started the RMAN backup I am getting below error.


RMAN-03009: failure of backup command on db_ch2 channel at 02/29/2013 06:22:28
ORA-00406: COMPATIBLE parameter needs to be 10.0.0.0.0 or greater
ORA-00722: Feature "Backup Compression"
continuing other job steps, job failed will not be re-run
released channel: db_ch1
released channel: db_ch2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on db_ch1 channel at 02/29/2013 06:22:28
ORA-00406: COMPATIBLE parameter needs to be 10.0.0.0.0 or greater
ORA-00722: Feature "Backup Compression"
  
I have checked the compatible parameter and compatible parameter is 9.2.0.  But database running on 10.2.0.4. 
We need to change the compatible parameter is 10.2.0
I have checked with application team and try to get approval for quick recycle the database. But they are doing some crucial test and they don’t allowed to do DB recycle. After one week I got the approval and changed the init parameter, recycled the database.  So while checking the prerequiste, we should cover all the things... If we miss anything, it will create a hmmm :-(

While bring up the database, I am getting below error.

ORA-32004: obsolete and/or deprecated parameter(s) specified
ORA-19905: log_archive_format must contain %s, %t and %r

SQL> !cat initDBUAT1.ora | grep log_archive_format
log_archive_format = _%t_%s.log

I have changed the log_archive_format init parameter and started the database.

SQL> !cat initDBUAT1.ora | grep log_archive_format = _%t_%s_%r..