I am getting the error at line 7 (see the code below) which is specified by 10g as :
Can anyone tell me what I'm doing wrong?
create or replace trigger demo1_bifer
BEFORE INSERT ON demo1
FOR EACH ROW
lock_id := dbms_utility.get_hash_value(to_char(:new.x),0,1024);
if (dbms_lock.request( id => lock_id,lockmode => dbms_lock.x_mode, timeout => 0, release_on_commmit => TRUE) not in (0,4))
then raise resource_busy;
You have mistyped
commit in the parameter name
release_on_commmit. Delete one of the three
On my system (Oracle 11g XE) I also got an error
PLS-00201: identifier 'DBMS_LOCK' must be declared. To fix this I needed to grant
DBMS_LOCK to the user I was creating the trigger as.