PL/SQL (MOSC)

MOSC Banner

Need Help with SET TRANSACTION and DBMS_LOCK

edited Feb 26, 2014 12:00PM in PL/SQL (MOSC) 2 commentsAnswered

Hi,

I'm trying to set the locking when setting the user's consumer group. I tried with both SET TRANSACTION and DBMS_LOCK. When executing, the output was success, but it seemed doing the job. Can some one please help me take a look and let me know where needs fix?

Code using  SET TRANSACTION:

commit;

SET TRANSACTION READ ONLY NAME 'mylock';

commit;

begin

dbms_resource_manager.set_initial_consumer_group(user => '"TESTERA"' ,consumer_group => 'LOW_GROUP');

commit;

end;

Output:

commit succeeded.

anonymous block completed.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Code using  DBMS_LOCK:

CREATE OR REPLACE FUNCTION my_handle (lock_name IN VARCHAR2) RETURN VARCHAR2 IS

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center