1832693 Members
3059 Online
110043 Solutions
New Discussion

Unix issue

 
jilpangs
Occasional Advisor

Unix issue

Hi,

i have the following code wrapped in a file named "execute"

echo $1 starts at `date`
sqlplus -S << +
@/home/dmeload/bin/user_id
@$1 $2 $3 $4 $5
exit sql.sqlcode
+
ret=$?
echo $1 ends at `date`
return $ret


I used to run database scripts as follows
$execute insert.sql. Everything was working perfect. But now suddenly i'm getting

ERROR:
ORA-00604: error occurred at recursive SQL level 1
ORA-04092: cannot COMMIT in a trigger
ORA-06512: at line 59

It executes all statements and after the last statement its displaying this error and wud rollback all changes.

I executed insert.sql directly from sqlplus. It ran fine.

Whats wrong with above code ?

Please help. Attached the output file.

Thanks
JIL
2 REPLIES 2
Thierry Poels_1
Honored Contributor

Re: Unix issue

hi,

ORA-04092: cannot COMMIT in a trigger
says it all, doesn't it?

You have a trigger with a commit statement in it. The trigger probably isn't fired for every row or you would have got the error sooner. Check your trigggers!

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Fred Ruffet
Honored Contributor

Re: Unix issue

Someone may have created a trigger on a table you use.

This script will give you triggers ordered by modification time (Last in result, last modified) :
select owner||'.'||object_name object,last_ddl_time
from dba_objects
where object_type='TRIGGER'
order by last_ddl_time
/

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)