Audit enqueue dequeue
I am using Oracle 11.2.0.3. I have point to point persistent queue implemented through PL/SQL API. I have set retention of the queue for 12 months. However, none of the queue tables/view has information on which server dequeued the message. How can I audit such information?
Also, I had tried following audit but I do not see anything in dba_audit_object when i dequeue a message. Am I doing anything wrong?
audit DEQUEUE ANY QUEUE by access;
Hi,
Looks like same query is reported in other open thread.
Messages are exchanged between a client and the Oracle Database server or between two Oracle Database servers using Oracle Net Services. Oracle Net Services also propagates messages from one Oracle Database queue to another.
You may need to check what all subscribers added to it.
select subscriber_id, queue_name, name, address, subscriber_type from aq$_<queue_table_name>_s;
Thanks,
Renu
Similar Messages
-
Hi,
Could anyone help me how audit enqueue or dequeue?
I've tried the follows statement, but it didn't work:
audit DEQUEUE ANY QUEUE by access;
audit ENQUEUE ANY QUEUE by access;"Audit enqueue and dequeue" only works for 10G at least due to oracle bug.
TAR 6016771.992 -
Query on sap locks(ENQUEUE/DEQUEUE)
Hi All,
should the sap locks ENQUEUE/DEQUEUE need to be used for all the updation/insertion of records ino the table?
Please confirm.Should this locking technique be used even for insertion of records into the table?
Regards,
Pra.Hi,
Lock objects are use in SAP to avoid the inconsistancy at the time of data is being insert/change into database.
SAP Provide three type of Lock objects.
- Read Lock(Shared Locked)
protects read access to an object. The read lock allows other transactions read access but not write access to
the locked area of the table
- Write Lock(exclusive lock)
protects write access to an object. The write lock allows other transactions neither read nor write access to
the locked area of the table.
- Enhanced write lock (exclusive lock without cumulating)
works like a write lock except that the enhanced write lock also protects from further accesses from the
same transaction.
You can create a lock on a object of SAP thorugh transaction SE11 and enter any meaningful name start with EZ Example EZTEST_LOCK.
Use: you can see in almost all transaction when you are open an object in Change mode SAP could not allow to any other user to open the same object in change mode.
Example: in HR when we are enter a personal number in master data maintainance screen SAP can't allow to any other user to use same personal number for changes.
Technicaly:
When you create a lock object System automatically creat two function module.
1. ENQUEUE_<Lockobject name>. to insert the object in a queue.
2. DEQUEUE_<Lockobject name>. To remove the object is being queued through above FM.
You have to use these function module in your program.
Hope this will give a basic idea. -
Issue with Enqueue / Dequeue
We are working on a scenario where data is got into SAP through Web methods to create Sales orders.
If we were to use Enqueue / Dequeue function while doing this would the web methods connection hold till the process is complete or would this time out in the middle?
Is there any time out period for the connection with web methods, and if so how can it can be reset to an alternate valueHi,
in ITS if you click on object, you can see the parmaters like
~TRANSACTION
<b>~TIMEOUT</b>
give more time for Time out parameter, that should solve the problem.
Regards
Vijay D T T. -
2515 Locking FMs to Enqueue/Dequeue/ Which one to use?
I know this question is redundant, and has been responded to a million times....all differently. However, being their are 2,515 function modules to choose from, what are the best choices for locking and unlocking a custom database table?
And, why are their 2,515 of them?
I take that back....many many more!
Thank-You
Edited by: Tom Matys on Sep 23, 2011 12:15 PMHi
I think the best way is to create a new lock object for every custom tables.
Every table should have an own lock object (so own fms to Enqueue/Dequeue) because it makes sure the same lock object is not used for another table at the same time.
If the same lock object is used for many tables it can risk to find a certain record locked although nobody locks it really.
Max -
What is AQ Enqueue/Dequeue
Hi ,
Can anybody explain me the concept of AQ Enqueue/Dequeue
I google and read the document but no get clear picture
Thanks in AdvanceCheck this link.
http://www.oracle-developer.net/display.php?id=319
>
I google and read the document but no get clear picture
>
Which document you read and what is not clear ? Try to be more precise and to the point in your questions. It will help you a lot in a getting quick and meaningful answers.
thanks
Raj -
Finding Enqueue/Dequeue functions
Hi,
Is there an easy way to find the enqueue/dequeue lock functions for a specific table?
I tried to find the enqueue/dequeue functions for table LIKP. It took me a while to find it, but it turns out the name is ENQUEUE_EVVBLKE.
You'd think that the table name would be incorporated into the function name to make it easy to find?!
Does anyone have a suggestion?
Thx.
AndyYes bro most of the times the table or field names would be in the Function module name.
Raghav -
I hav designed a new application for store i wish to enqueue & dequeue materials which store persons are using.
So how can this be done.Please guide once i open any material in my applcation its locked untill i come out my application.I wishto unclock as my processing is over.
Pls guide whch FM to use.hi,
Create a lock object from SE11 by giving the name
lock object : ezlock_material.
call the function module enqueu_ezlock in th loop to which to all the materials to lock.
to lock the material
call the function module dequeu_ezlock in th unloop to which to all the materials to unlock.
to unlock the material.
Regards,
Madhavi -
JMS Enqueue/Dequeue without using oracle.jms package
Hi,
Is it possible to successfully enqueue/dequeue messages from Oracle AQ using JMS which only uses the classes under javax.jms package, not the classes under oracle.jms package. If possible, can anybody please provide some step by step example.
ThanksYou can get the connection factory and the queue from an application server's jndi. Create a resource provider reference in oc4j and get them from there. Read the oc4j services guide, oems (jms) chapter for how to do that.
I think if you are not using an application server you can also get the connection factory and queue from an ldap directory. check out Aq user guide for that. -
Enqueue/Dequeue - Locking/Unlocking object
Hi all,
Please help me working with this enqueue/dequeue command. What I'm trying to do is to lock a Service Order. My requirement is to do a BDC for the Service Order Settlement Rule. So after hitting SAVE, a secondary process will be kicked off to perform my BDC for the same order. Now what Im doubting is that what if user re-enter the same Service Order again so quick. So my BDC program will not be performed immediately since it will be locked by the usser.
So my idea is to lock it first while my BDC program is still running. Any help please? Thanks.Nope. Just 1 BDC -on my 2nd program only. Or to make it simple, I have modified ZXWOCU07 (IWO10009) to perform/kick off a call function( this is being triggered after hitting on SAVE). And this FM contains my checking if SO is now open for change then do the do the BDC.
What I'm thinking is to lock first the SO to block any user from accessing that SO, so it will do the BDC first. But I'm not yet familiar with the locking/unlocking of objects. Please help me on how to use enqueue or locking object. -
Enqueue/Dequeue in Oracle Aq Adapter
Hi,
I need to use enqueue/dequeue option in oracle aq adapter.
However i need to know how the macthing of ids has to happen.
Can any one provide me with an example with details steps?
Thanks,
RoshThe below url will provide information about AQ adapter,
http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_aq.htm
Example of AQ adapter.
http://jamessmith73.wordpress.com/oracle-fusion-middleware/oracle-soa-bpm-11g-blogs/soa-10g/soa-hands-on-4/
Thanks,
Vijay -
Hi,
There are 2 reports accessing 1 table. I am facing the runtime error with description - "The database system detected a deadlock and avoided it by rolling back your transaction.u201D
Have come across implementing the ENQUEUE and DEQUEUE concept on the table. Please clarify the below queries:
1.Is the above error occuring beacuse the two reports are accessing the table at the same time?
2.Implementing EN/DEQUEUE will solve the problem?
3.If first report is writing the data to table at 12pm(after locking the table), and the second report trying to access the table at 12:10pm to write the data, will this wait in some queue and write the data after the first report releases the table lock?
Regards,
RajkamalHello Raj,
You should understand the difference between Database Locks & SAP locks.
The database system detected a deadlock and avoided it by rolling back your transaction
1.Is the above error occuring beacuse the two reports are accessing the table at the same time?
Initial look at the statement suggests that this is because of Database Lock collision. You need to check if both the programs were trying to write (INSERT/UPDATE/MODIFY/DELETE) the same data to the DB table.
2. Implementing EN/DEQUEUE will solve the problem?
It should. But make sure you don't lock the entire table, try to lock only the individual records which are being processed(This is a good coding practice, of course you can override it depending on your requirement).
3.If first report is writing the data to table at 12pm(after locking the table), and the second report trying to access the table at 12:10pm to write the data, will this wait in some queue and write the data after the first report releases the table lock?
No, afiak there is no such queue. Alternatively you can put the lock in a iteration(viz., DO loop, WHILE loop) & check when the locks are released.
Hope i'm clear.
BR,
Suhas -
Lock specific number of records using ENQUEUE & DEQUEUE
Hi,
Is it possible to lock a group of records in R/3?
My requirement is to update a set of records in VBAP table. I'm not using a BAPI here. Instead, I use a direct UPDATE.
In this case, i know i can lock individual records by passing VBELN and POSNR. But what if i have to lock 10 records?
Is this possible in any way?
Thanks in advance.
The current solution is:
1) LOOP at ITAB
2) LOCK each entry
3) UPDATE VBAP for that entry
4) UNLOCK the entry
5) Endloop
I thought this solution might work: (Assume 10 records are present in ITAB)
1) LOOP at ITAB (Lock all 10 entries)
2) LOCK that entry
3) ENDLOOP
4) UPDATE VBAP from ITAB (Updates all 10 entries in one databae access)
5) LOOP at ITAB(Unlock all 10 entries)
6) UNLOCK that entry
7) ENDLOOP
Any help will be appreciated.
Tabraiz.Hello,
Both of your solutions will work.
With solution 1 there will always be only 1 enqueue object created, because you always enqueue, perform the update and dequeue.
This means that in SM12 you will only see 1 enqueue entry on your user ID at the same time when your program runs.
Solution 2 is also possible but there you will have different enqueue objects that will be created, because you enqueue everything, then perform the updates and then dequeue everything.
In SM12 (lock entries) this will result in more enqueue records on your user ID the time your program runs.
You have to pay attention that lock entries (SM12) are stored in a queue that is limited, so make sure with solution 2 that you don't overflow the enqueue queue ! ! !
Via tcode RZ11 you can check parameter enque/table_size (Size of lock table).
Check the parameter value but also its documentation and you will understand why you should limit the number of open lock records.
Success.
Wim Van den Wyngaert -
Enqueue/ Dequeue Table record
Dear Experts,
I am updating a record in my z-table which is appended in LFA1 through a Z-program.
Prior to my update command i want to Enqueue that particular record and once it is updated i want to dequeue it.
Can you please suggest the function module to perform this.
Best Regards
Ankur GuptaHi
You this FMs.
ENQUEUE_E_TABLE
DEQUEUE_E_TABLE
The type of locks used in these are explained in the link below.
http://help.sap.com/saphelp_nw04/helpdata/en/7b/f9813712f7434be10000009b38f8cf/content.htm -
How to use Enqueue/Dequeue to prevent concurrent write?
Hi All,
I have a report program that allows multiple users to save to the database tables.
How do I incorporate ENQUEUE and DEQUEUE statements to prevent concurrent write to ensure data integrity? Are there sample codes that I could refer to?
ThanksHi,
here screen get locked
CALL FUNCTION 'ENQUEUE_EIQMEL'
EXPORTING
mandt = sy-mandt
qmnum = i_final_ap-qmnum -Notification number
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
*--Setting the task "PE03" for notification on screen
CALL FUNCTION 'IQS4_ADD_DATA_NOTIFICATION'
EXPORTING
i_qmnum = i_final_ap-qmnum
i_conv = ' '
i_post = c_x
i_commit = c_x
i_wait = c_x
TABLES
i_viqmsm_t = i_viqmsm_tmp
return = i_return.
CALL FUNCTION 'DEQUEUE_EIQMEL'
EXPORTING
mandt = sy-mandt
qmnum = i_final_ap-qmnum.
Maybe you are looking for
-
Jsp works in my tomcat but not in school server
Using netbeans 5.5.1 and it has tomcat 5.5.17. My jsp page works fine when I use it on my computer but when I copy it to my school server(tomcat 5.5) it bugs when trying to contact oracle jdbc database. Whats wrong? Gives this error: HTTP Status 500
-
Reluctantly tried Firefox Refresh. Step #3 says "3.Firefox will close to refresh itself. When finished, a window will list your imported information. Click Finish and Firefox will open." I never got that window. Firefox re-opened after about 20 minut
-
Salary Data iview inside General Information
Hello Colleagues, In MSS, we added the "Salary Data" iview to the "General Information" section/workset. However, when we select an employee in the "Search" area, no data is displayed in the "Salary Data". However, the "Salary Data" works when used i
-
Disabling Auto Forward Option in Outlook 2007
Hello All, i have Exchange Server 2007 and a client running MS Outlook 2007. this client is a member of a ditribution group. when she sends and e-mail to this distribution group, Exchange sends her back the email she sent(as it should), but also two
-
Creating same event under different times
Hi there, I'm curious if there is a feature to set an event in Calendar in different times. Here's an example: an event is on June 20th at 5-7pm AND also June 21st 10am-4pm. Is there a way to easily add it? (P.S. Is there a better name for this)