Thursday, August 14, 2014

sql script to check from DML lock

select t1.sid "SID", s.username, s.osuser, s.program,
s.machine, o.object_name, t1.ctime
from v$lock t1, v$session s, dba_objects o
where
t1.type='TM' and
t1.sid = s.sid and
t1.id1 = o.object_id
order by t1.sid, t1.ctime;
Reply With Quote

Wednesday, July 23, 2014

Find the enabled events using ORADEBUG EVENTDUMP and disable it


+ASM1 AS SYSDBA> oradebug setmypid
Statement processed.
+ASM1 AS SYSDBA> oradebug eventdump system
27090 trace name errorstack level 3

+ASM1 AS SYSDBA> alter system set events '27090 trace name errorstack off';
System altered.
+ASM1 AS SYSDBA> oradebug setmypid
Statement processed.
+ASM1 AS SYSDBA> oradebug eventdump system;
Statement processed

Monday, April 28, 2014

SQL failed when field exceed 255 character.

Problem description:

SQL load failed with following error:
Field in data file exceeds maximum length


Cause:
By default, when you mention “columnname char” without the size in the control file, sql loader will load maximum of 255 characters long to that particular column, even your column size is more than 255 characters in the table. In this situation, if we want to load the column data more than 255 characters data, explicitly we need to mention the size in the control file within the datatype.

Solution:

In the sqlldr control file, change column:
description
to:
description char(500)