Pl/sql callbacks
Has anyone ever had the plsql callback testproc work for them???
I'm on 10.1.3.0.1.
I run
exec edg_utl.add_rule(rulename => 'MyRule', condition => ':event.type = 200', param => 'edg_utl.testProc',command => 'call')
I added an insert in the testProc to insert into my testtable. That way I don't have to worry about the log level stuff.
I never, ever, get any rows to insert into that testtable. That leads me to believe that the testProc never gets called.
I even restart the whole machine. Nothin'.
I've read the README in j2ee\home\applications\edge\edge\sample\StreamsSample
I've ran:
exec DBMS_APPLY_ADM.STOP_APPLY('EDG_APPLY');
exec DBMS_APPLY_ADM.START_APPLY('EDG_APPLY');
So, again, if you have successfully made this work, please do let me know some other actions I can try.
Thanks!
Hi,
I'm assuming you've applied all the prereq patches.
My guess would be that you've got Datavault enabled in the database... fire up sqlplus and see if you get:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
If so, turn off datavault and run the install again. If not... don't know.
Regards
Gavin
Similar Messages
-
PL/SQL Callback notification with aq$_jms_text_message
Hi,
i want to set up a notfication for a pl/sql callback procedure. The message in my queue is enqueued via propagation from another instance. This is my setup (using oracle 10.2.0.3):
-------- the queue (multiconsumer): --------------
begin
dbms_aqadm.create_queue_table(queue_table => 'zmon_evt_in_qtable',queue_payload_type => 'sys.aq$_jms_text_message', multiple_consumers => true);
dbms_aqadm.create_queue(queue_name => 'zmon_evt_in_queue',queue_table => 'zmon_evt_in_qtable' );
dbms_aqadm.start_queue( queue_name =>'zmon_evt_in_queue' );
end;
-------- the callback-procedure (simply inserting an entry in a table called 'test'): --------------
create or replace procedure evt_in_callback(
context IN RAW,
reginfo IN SYS.AQ$_REG_INFO,
descr IN SYS.AQ$_DESCRIPTOR,
payload IN VARCHAR2,
payloadl IN NUMBER) is
begin
insert into test(textfeld) values ('RECEIVED!');
commit;
end evt_in_callback;
-------- the subscriber: --------------
begin
dbms_aqadm.add_subscriber(queue_name => 'zmon.zmon_evt_in_queue',
subscriber => sys.aq$_agent('zmon_evt_in_subscriber',null,null));
end;
-------- the notification: --------------
declare
reginfo sys.aq$_reg_info;
reg_list sys.aq$_reg_info_list;
begin
reginfo := sys.aq$_reg_info(name => 'zmon.zmon_evt_in_queue:zmon_evt_in_subscriber',
namespace => DBMS_AQ.NAMESPACE_AQ,
callback => 'plsql://zmon.evt_in_callback',
context => HEXTORAW('FF')
reg_list := sys.aq$_reg_info_list(reginfo);
DBMS_AQ.REGISTER(reg_list => reg_list,
reg_count => 1);
end;
The callback-procedure is not fired on arrival of a message in the queue. But i can see the the appropriate notfication-entry in sys.reg$.
Any suggestions why this doesn't work ?
BTW: can anybody tell me the meaning of the context-Parameter in the aq$_reg_info-Type ? Everybody uses HEXTORAW('FF'), but I don't understand what that means...
Jens
Edited by: dschenzl on Jun 4, 2009 11:13 AMFinally, it's done.
The subscriber used in the propagation has to be the notification-subscriber (zmon_evt_in_subscriber). I used another subscriber, which was not registered for notification.
I found the solution in this thread: Callback trouble from mesage via propagated message.
Two days filled up with frustrating work - man, how i hate that...
Greetings to the community,
Jens -
PL/SQL Callback to Dequeue
I have a procedure that automatically dequeues from a PL/SQL callback (9iR2) in a single consumer queue within the same instance. The same procedure functions when manually called agaist a propogated queue in a separate instance, but it will not work via PL/SQL callback.
Callback code:
DECLARE
reginfo1 SYS.aq$_reg_info;
reginfolist SYS.aq$_reg_info_list;
BEGIN
-- register for the pl/sql procedure notifyCB to be called on notification
-- AQNMDLINK: schema owner
-- CFR_QUEUE_DEST: prop queue
-- NMD: consumer
reginfo1 :=
SYS.aq$_reg_info ('AQNMDLINK.CFR_QUEUE_DEST:NMD',
1,
'plsql://AQNMDLINK.p_dequeue_cfr_submit',
HEXTORAW ('FF')
-- Create the registration info list
reginfolist := SYS.aq$_reg_info_list (reginfo1);
--SYS.DBMS_AQ.unREGISTER (reginfolist, 1);
SYS.DBMS_AQ.REGISTER (reginfolist, 1);
COMMIT;
END;Perhaps this guide can help you:
Application Developer's Guide - Advanced Queuing Contents / Search / Index / PDF
http://download-east.oracle.com/docs/cd/B10501_01/appdev.920/a96587.pdf
Joel P�rez -
PL/SQL Callback registered on multi consumer queue takes 6 seconds to call
Registered a PL/SQL callback procedure on multi consumer Queue. if I enqueue message into queue, it takes 6 seconds to call PL/SQL callback procedure.
Why does it takes 6 seconds ?
I believe Queue submits DBMS Job to execute the Callback. I am not sure why it is taking 6 seconds to execute the callback.
are there any configarable parameters to set which allows callbacks to be executed more frequently?You can try to change jobqueue_interval=1
This is a scan rate interval (seconds) of job queue parameter.
it is 5 sec by default.
Regards,
Sergey -
AQ Callbacks - Blocking background processes and best practices.
We are running several queues within our company and one of them uses pl/sql callback functionnality.
Basically, several triggers can enqueue a message when underlying tables are updated. The goal of the callback is to "treat" those messages, which means dequeuing the messages and passing them to some procedure (determined through a confguration table and the type of message). I don't know if i'm clear enough on this but it is as important.
In general the mechanism works perfectly but we noticed in one of our databases that, after a relatively big amount of messages enqueuing (~ 500-1000 in one trasanction), there are numerous background processes blocked on system table SYS.AQ_SRVNTFN_TABLEI. In fact, the queue starts growing and messages are not dequeued anymore by the callback, that doesn't seem to be executed anymore at all.
We actually were also unable to re-compile the package that holds the callback procedure nor removing/adding the reference of the subscriber to the queue with DBMS_AQ. It would hang there forever...
We are running Oracle Database 10g Enterprise Edition Release *10.2.0.4.0* and the value of AQ_TM_PROCESSES = 0.
I don't necesseraly have a complete and clear view of how the queue mechanism works behind the scenes so forgive for some foolish things I could say :-)
Diagnosis:
After some research, it seems the backgrounds processes are blocked on the system table SYS.AQ_SRVNTFN_TABLE on some index for MSGID.
If I understand correctly how the system works, the callback gets executed for a specific MSGID as we use it in the callback procedure to dequeue this message.
I've also discovered that the default value for the WAIT dequeue option is FOREVER...
So my idea was that, for some reason, the callback tries to dequeue a message that does not exist in the queue and... waits forever for the message to "appear".
This at first seemed pretty unlikely to me: why would the callback be executed if no message with provided MSGID exists... then you start doubting :-)
Attempt to resolve:
We've decided to alter the WAIT option to not let the dequeue in the callback wait forever.
We have made some tests (outside the callback) with NO_WAIT and also with a wait of a few seconds. Both solution prooved right so we added a wait of 60s in the callback and added some tracing.
Since then, no more background processes seems to hang there and we are able to alter the callback procedure normally. But with the added tracing, we noticed an unexplained behavior with the execution of the callback:
- callback runs
- ORA-25263: no message in queue QUEUE_OWNER.MULTISRC_NOTIFQ with message ID B4FFD1115523A46EE040007F0100304F
- callback runs again and message is dequeued and treated correctly
The first oracle error happens fast, not after 60s as the WAIT option specifies.
Questions:
<li>Is the way the callback method is implemented correct (see code below) ?</li>
<li>Do we need to commit in the callback method ? What implies committing or not ?</li>
<li>How wouold you explain the behavior of the callback after setting the dequeue WAIT to 60s and why it does not actually wait for 60s ?</li>
<>
<>
<>
<>
The configuration of the queue and the callback is as follow:
- the type of the payload is SYS.ANYDATA
- an extra index is create on CORRID column
begin
-- create queue table
begin
DBMS_AQADM.CREATE_QUEUE_TABLE(QUEUE_TABLE => 'QUEUE_OWNER.MULTISRC_NOTIFTAB'
,QUEUE_PAYLOAD_TYPE => 'SYS.ANYDATA'
,MULTIPLE_CONSUMERS => true);
end;
-- create and start queue
begin DBMS_AQADM.CREATE_QUEUE(QUEUE_NAME => 'QUEUE_OWNER.MULTISRC_NOTIFQ', QUEUE_TABLE => 'QUEUE_OWNER.MULTISRC_NOTIFTAB'); end;
begin DBMS_AQADM.START_QUEUE(QUEUE_NAME => 'QUEUE_OWNER.MULTISRC_NOTIFQ'); end;
-- grant access to the queue to PDO
-- add a subscriber to the queue and register the plsql to execute
begin
DBMS_AQADM.ADD_SUBSCRIBER(QUEUE_NAME => 'QUEUE_OWNER.MULTISRC_NOTIFQ'
,SUBSCRIBER => SYS.AQ$_AGENT('MULTISRC_NOTIFSUBSCR', null, null));
DBMS_AQ.REGISTER(SYS.AQ$_REG_INFO_LIST(SYS.AQ$_REG_INFO('QUEUE_OWNER.MULTISRC_NOTIFQ:MULTISRC_NOTIFSUBSCR'
,DBMS_AQ.NAMESPACE_AQ
,'plsql://PDO.PO_NOTIFY.MULTISRC_NOTIF_SUBSCRIBER?PR=0'
,HEXTORAW('FF')))
,1);
end;
end;
create index queue_owner.multisrcq_corrid on queue_owner.multisrc_notiftab (CORRID)
The callback procedure is as follow:
procedure MULTISRC_NOTIF_SUBSCRIBER(context raw,
REGINFO SYS.AQ$_REG_INFO,
DESCR SYS.AQ$_DESCRIPTOR,
PAYLOAD raw,
PAYLOADL number) is
L_METHOD constant varchar2(50) := 'MULTISRC_NOTIF_SUBSCRIBER';
R_DEQUEUE_OPTIONS DBMS_AQ.DEQUEUE_OPTIONS_T;
R_MESSAGE_PROPERTIES DBMS_AQ.MESSAGE_PROPERTIES_T;
V_MESSAGE_HANDLE raw(16);
O_PAYLOAD ANYDATA;
cursor C_TREATMENTS(P_ENTITY in varchar2) is
select T.MNOT_PROCEDURE_C
from TA_GEN.MULTISRC_NOTIF_TREATMENTS T
where T.MNOT_ENTITY_C = P_ENTITY
and T.MNOT_BEGIN_D < sysdate
and ((T.MNOT_END_D > sysdate and T.MNOT_END_D is not null) or
(T.MNOT_END_D is null))
order by T.MNOT_PRIORITY_N asc;
WK_CORRID varchar2(128);
WK_ENTITY TA_GEN.MULTISRC_NOTIF_TREATMENTS.MNOT_ENTITY_C%type;
WK_PROCEDURE TA_GEN.MULTISRC_NOTIF_TREATMENTS.MNOT_PROCEDURE_C%type;
CT_EXEC number(2) := 0;
begin
-- DGH: 15.12.11 / added a wait of 60 seconds for dequeue to avoid infinite waiting (default is FOREVER)
R_DEQUEUE_OPTIONS.WAIT := 60;
-- dequeue message
R_DEQUEUE_OPTIONS.MSGID := DESCR.MSG_ID;
R_DEQUEUE_OPTIONS.CONSUMER_NAME := DESCR.CONSUMER_NAME;
DBMS_AQ.DEQUEUE(QUEUE_NAME => DESCR.QUEUE_NAME,
DEQUEUE_OPTIONS => R_DEQUEUE_OPTIONS,
MESSAGE_PROPERTIES => R_MESSAGE_PROPERTIES,
PAYLOAD => O_PAYLOAD,
MSGID => V_MESSAGE_HANDLE);
-- extract entity name
WK_CORRID := R_MESSAGE_PROPERTIES.CORRELATION;
WK_ENTITY := SUBSTR(WK_CORRID,
INSTR(WK_CORRID, '##') + 2,
(INSTR(WK_CORRID, '##', 1, 2) -
INSTR(WK_CORRID, '##')) - 2);
-- execute treatment(s)
open C_TREATMENTS(WK_ENTITY);
loop
fetch C_TREATMENTS
into WK_PROCEDURE;
exit when C_TREATMENTS%notfound;
execute immediate 'begin ' || WK_PROCEDURE || '(:MSG); end;'
using O_PAYLOAD;
CT_EXEC := CT_EXEC + 1;
end loop;
close C_TREATMENTS;
exception
when others then
if C_TREATMENTS%isopen then close C_TREATMENTS; end if;
PO_NOTIFY.TRACE_MULTISRC_NOTIF(L_METHOD,
sqlerrm,
DESCR.MSG_ID,
R_MESSAGE_PROPERTIES.CORRELATION,
WK_ENTITY,
WK_PROCEDURE);
rollback;
end MULTISRC_NOTIF_SUBSCRIBER;Helping you with the specific issue is going to be difficult without direct access to the servers but given the importance this system seems to have to your business why are you not running on a fully supported version (10.2 has been in extended support for more than 6 months) and even in the current configuration not patched to 10.2.0.5?
My instinct would be to focus on moving to 11.2.0.3 as quickly as possible with a corresponding change to a current operating system version if your O/S is similarly out of date. -
Does anyone know how to TRACE the 'sessions' that are performing the callbacks? I need to report the performance statistics and usages involved with using the PL/SQL callback.
I have tried putting the instance into trace mode (alter system set sql_trace=true) and restarting the instance but I can not find any evidence of my callback procedure being called in the resulting trace files.
Thanks
RussellThanks for the responses.
'Callback' is a term used by Oracle, within the context of AQ, for notification of automatic notification of new messages. For your education, it can either execute a PL/SQL procedure, generate an email or make a HTTP request.
I am attempting to trace on a v10.2 database, but the process for trace is typically the same across versions (excepting some old versions).
re Dan: thos sort of reply is not at all helpful, could I suggest if you do not know the subject matter then do not reply. In that way volunteers can save a lot of valuable time
According to Metalink (Note:305662.1) these processes can be traced by the following method :
QUOTE>>
1. For CPU consumption issues sql trace the QMON process in question by doing the following
Determine the pid of the qmn process (by viewing the OS processes), call it X
sqlplus "/ as sysdba"
oradebug setospid X
oradebug unlimit
oradebug Event 10046 trace name context forever, level 12
--Generate trace for 20 minutes
oradebug Event 10046 trace name context off
<< QUOTE.
Russell -
AQ Propagation Notifications/PLSQL Callback Query?
I have the following scenario working but have a question:
I have two databases, I Enqueue a message onto a Queue in Database 1 and scheduling Propagation to a Queue in Database 2.
In Database 2 the queue has a PL/SQL procedure registered (using DBMS_AQ.Register) so that as the propagated message arrives it calls the procedure which dequeues it and saves the message to the Table.
It is all working fine, except that the Dequeue process on Database 2 seems to get invoke after approx 5 mins after it is Enqueued. SO you can see the message on the Subscribing Queue with an Enqueue Time, and it seems to always be about 5 mins later till the procedure is kicked off to dequeue it.
How do you set the time that it takes to dequeue the message?
There are no parameters on the DBMS_AQ_Register proc to set this.
I can't find anything in the docs?
I originally had a demo setup using PL/SQL callback on a local Queue (without propagation between two Databases) and the Dequeue was virtually instantaneous?
Regards
StuartHello,
jobqueue_interval is not unsupported it is just hidden. In most cases the default is enough which is why it is hidden. As I recall the default is 5 seconds in 10.2 so it does not explain the 5 minute delay you are seeing. AQ only ever uses 1/2 the available job_queue_processes so if only 1 is available I would be surprised if it worked at all. Have you increased the number to 10?
There are no other ways to tune notification callbacks in any available version of Oracle that I am aware of.
Thanks
Peter -
AQ PL/SQL registered notifications
Suppose I want to see what registered notifications exist for AQ plsql notifications.
What I'm talking about are those notifications to PL/SQL callback procedures that have been registered using DBMS_AQ.REGISTER.
I've searched and searched for data dictionary information about this but cannot find it.
How can I use DBMS_AQ.UNREGISTER if I do not know what is already registered ?
I would have thought that SYS.ALL_STREAMS_MESSAGE_CONSUMERS would have been a good guess but it doesn't have any rows and I have a working PLSQL notification active.
Database is v10.2.
Anyone know where to find this information ?
Thanks.Hello,
Unfortunately there is not a user view which is definitely an oversight. As suggested you could be granted the necessary privilges on sys.reg$ to overcome this.
However, this whole area has been re-invigorated by the Database Change Notification feature which came in in 10.2. So much so that in 11.1 onwards you have the SUBSCRREGISTRATIONS and other v$ views as per http://download.oracle.com/docs/cd/B28359_01/server.111/b28420/aq_views.htm#sthref1151.
The EMON process architecture has been changed to the now standard Coordinator/slave architecture as well. So with this investment in development in this area the robustness, scalability and diagnosability is improving.
Thanks
Peter -
Callback Function in AQ not launched
Hi All,
I have registered a callback function on a queue. When I enqueue it has to call callback function. Below is my scrip for creation of Queue and Enqueue.
CREATE type xxMessage_typ as object
( subject VARCHAR2(30), text VARCHAR2(80));
=================================================
BEGIN
SYS.DBMS_AQADM.CREATE_QUEUE_TABLE(
QUEUE_TABLE => 'XXKNL_TEST_QTAB'
,QUEUE_PAYLOAD_TYPE => 'xxMessage_typ'
,MULTIPLE_CONSUMERS => TRUE);
END;
===============================================
BEGIN
SYS.DBMS_AQADM.CREATE_QUEUE(
QUEUE_NAME => 'XXKNL_TEST_Q'
,QUEUE_TABLE => 'XXKNL_TEST_QTAB'
END;
============================================
BEGIN
dbms_aqadm.add_subscriber
( queue_name => 'XXKNL_TEST_Q',
subscriber => sys.aq$_agent( 'RECIPIENT', null, null ) );
SYS.DBMS_AQ.REGISTER ( SYS.AQ$_REG_INFO_LIST( SYS.AQ$_REG_INFO('XXKNL_TEST_Q:RECIPIENT',DBMS_AQ.NAMESPACE_AQ,
'plsql://XXKNL_NOTIFYCB',
HEXTORAW('FF')
1
END;
===================================
BEGIN
SYS.DBMS_AQADM.START_QUEUE
QUEUE_NAME => 'XXKNL_TEST_Q'
,ENQUEUE => TRUE
,DEQUEUE => TRUE
END;
==========================================
DECLARE
enqueue_options dbms_aq.enqueue_options_t;
message_properties dbms_aq.message_properties_t;
message_handle RAW(16);
message xxmessage_typ;
BEGIN
message := xxmessage_typ('NORMAL MESSAGE', 'This is my Q..' );
dbms_aq.enqueue(queue_name => 'xxknl_test_q',
enqueue_options => enqueue_options,
message_properties => message_properties,
payload => message,
msgid => message_handle);
end;
========================================================
create or replace procedure xxknl_notifyCB( context raw,
reginfo sys.aq$_reg_info,
descr sys.aq$_descriptor,
payload raw,
payloadl number)
as
dequeue_options dbms_aq.dequeue_options_t;
message_properties dbms_aq.message_properties_t;
message_handle RAW(16);
message xxmessage_typ;
BEGIN
dequeue_options.msgid := descr.msg_id;
dequeue_options.consumer_name := descr.consumer_name;
DBMS_AQ.DEQUEUE(queue_name => descr.queue_name,
dequeue_options => dequeue_options,
message_properties => message_properties,
payload => message,
msgid => message_handle);
insert into xxknl_test values
( 'Dequeued and processed "' || message.text || '"' );
COMMIT;
END;
Please let me know if something is missed.
Thanks
RishiHi,
Kindly check below;
AQ PL/SQL Notification: PL/SQL Callback and Email Notification (Doc ID 225749.1)
Also let me know if there are any Q0** or J0** traces generated.
Thanks, -
PL/SQL notification / DBMS_AQ.REGISTER
There have been a number of discussions on this forum about PL/SQL notifications. I'm running
into the same problem:
- create the notification procedure
- register the procedure
- enqueue a message
- NOTHING HAPPENS
It seems that the notification procedure is not executed.
The discussions on this forum were all inconclusive. Did anybody get this to work? If yes, can
you post an example (i.e. a script that creates the queue, create the procedure, registers the
procedure and enqueues a message)?
Is there a table/view that contains the registrations?
What system parameters are relevant to this functionality?
Where are errors in calling the notification procedure logged?There are few problems that I can see with your code.
Your callback procedure header should look like this:
create or replace procedure QCallBack1(
context RAW,
reginfo SYS.AQ$_REG_INFO,
descr SYS.AQ$_DESCRIPTOR,
payload VARCHAR2,
payloadl NUMBER) is
BEGIN
END ;
And your callback notification does not include the name of the QUEUE subscriber. The first parameter
to the AQ$_REG_INFO should be of this format: <QUEUE ADMIN>.<QUEUE_NAME>:<QUEUE SUBSCRIBER>
When you say this:
sys.aq$_reg_info('myprofile.Que1',dbms_aq.namespace_aq, 'plsql://myprofile.QCallBack1', hextoraw('FF'));
You are not putting the name of the queue subscriber into the first parameter.
Also, Your callback notification URL must be like this:
'plsql://<user containing the callback proc>.<name of the callback proc>?PR=1'
Note that if the callback procedure is in another schema, you must grant EXECUTE priv. to the user
where the QUEUE has been setup.
Hallo,
I have got the same problem as Erwin Groenendal. I wrote single user que and procedures to enque and deque as simple as I can do.
pseudocode:
1. create and start que - no error
2. create proc for callback in pl/sql - no error
3. register callback - no error
4. enque message - noerror (no callback called)
5. deque message - noerror
in callback procedure I am writing into my own table with one varchar2 column to determine if the callback was processed.
My register procedure looks like: (pseudocode point 3)
procedure Register
is
XRegProc sys.aq$_reg_info;
XRegList sys.aq$_reg_info_list;
begin
XRegProc := sys.aq$_reg_info('myprofile.Que1', dbms_aq.namespace_aq, 'plsql://myprofile.QCallBack1', hextoraw('FF'));
XRegList := sys.aq$_reg_info_list(XRegProc);
dbms_aq.register(XRegList, 1);
end;
in definition variable XRegProc I tryed all possibilities like:
'plsql://myprofile.QCallBack1'
'plsql://myprofile.QCallBack1?PR=0'
'plsql://QCallBack1'
'plsql://myprofile.QCallBack1'
and so on.
The Callback looks like:
procedure QCallBack1(
context out raw,
reginfo out sys.aq$_reg_info,
descr out sys.aq$_descriptor,
payload out raw,
payloadl out number)
is
begin
insert into MyOwnTable (my_text) values ('Message notification callback called.');
commit;
end;
with compilation i have not problems. I am running oracle 9i release 2.
the enque procedure looks like:
procedure put(
APayload in raw,
ACorrelation in varchar2)
is
XEnq_opts dbms_aq.enqueue_options_t;
XMsg_props dbms_aq.message_options_t;
XMsg_id raw(16);
begin
XMsg_props.correlation := ACorrelation;
dbms_aq.enqueue('Que1', XEnq_opts, XMsg_props, APayload, XMsg_id);
commit;
end;
All rights are corectly sets under SYSTEM user.
Please help somebody why it does not work. I not see problem byt I need to call some procedure when new message arive into que. I need to have paralel process, I can not solve it with loops and so on.
Thanks for every ideas. In next week I can show you source code. Today I can not.
Regards, Zdenek.
For Oracle9i and above DBMS_AQ.REGISTER can be used for PL/SQL callback notification.
If running earlier version of Oracle, use DBMS_AQ.LISTEN to get a similar functionality.
It depends upon the URL that you specify while registering, that decides if callback will be executed or
not.
If you post the code fragment(s) of how you created the notification procedure and how you registered it,
maybe we can look to see if it is correct.
There have been a number of discussions on this forum about PL/SQL notifications. I'm running
into the same problem:
- create the notification procedure
- register the procedure
- enqueue a message
- NOTHING HAPPENS
It seems that the notification procedure is not executed.
The discussions on this forum were all inconclusive. Did anybody get this to work? If yes, can
you post an example (i.e. a script that creates the queue, create the procedure, registers the
procedure and enqueues a message)?
Is there a table/view that contains the registrations?
What system parameters are relevant to this functionality?
Where are errors in calling the notification procedure logged? -
Plsql callback (dbms_aq.register) stops working
we had, for quite a while, a working situation where a incoming message notifies a plsql procedure, which dequeues and handles the message, resulting in a response message in a different queue
the queue has one subscriber and through dbms_aq.register I registered a plsql callback and all worked fine for about a year
suddenly this stopped working - messages aren't dequeued anymore - for no apparent reason (nothing changed in this part of the database)
I already dropped and recreated the queue table, queues, subscriptions and registered the plsql callback again, but no results
does anyone have a clue where to look (specific sys tables/views, database parameters etc) because I am running out of ideas...
we are running the 10.2.0.1.0 database
greatings
JanJan,
The EMNO (Event Monitor) process is responsible to execute the AQ notifications, in this case your pl/sql callback. This may or may not be your problem. I'm not sure how much help this link will be but it covers Event Monitor issues for various versions of Oracle. https://metalink.oracle.com/metalink/plsql/f?p=130:14:2721106654994549115::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,105067.1,1,1,1,helvetica
Jason -
Registering AQ Callback function
Can Oracle-8.1.7 which is installed on a Sun-Solaris machine send a notification to a WindowsNT callback function?
I am using OCI for receving notifications from AQ.
If I have Oracle and the Client application running on the same Operating system then everything works fine.
If I run Oracle on Sun-Solaris, and the Client application on WindowsNT, then the client application is NOT able receive notifications from AQ.Hi,
Kindly check below;
AQ PL/SQL Notification: PL/SQL Callback and Email Notification (Doc ID 225749.1)
Also let me know if there are any Q0** or J0** traces generated.
Thanks, -
DIP Provisioning PL/SQL Hello World?
I'm looking for a very basic example of setting up a DIP provisioning profile to capture events , call a PL/SQL callback, and probably just spit out the events that are sent to a table.
Does anyone have a procedure/code for this or a reference to where I might find something like this?
There is something like what I'm looking for on metalink (434758.1), but this is Java instead of PL/SQL.
ThanksCan you clarify the issue, please?
I cannot find the ML Note.
Are you changing something in the OID that should trigger the callback?
cu
Andreas -
Error during creation of application entity for the plug-in.
Hi Experts,
As part of creating Content Database source for SES....
We,
1 Activated the Oracle Internet Directory identity plug-in for the Oracle Content
Database instance.
2) However after activating Identity plug-in for Oracle Internet Directory.... ......... we used the csPlugin.ldif file to create an application entity for the plug-in by running the following command "$ORACLE_HOME/bin/ldapmodify -h oidHost -p OIDPortNumber -D "cn=oracle" -w password -f csPlugin.ldif" ....but in the process executing the above command.... getting the following error(we gave correct login details):
SASL/DIGEST-MD5 authentication started
ldap_sasl_interactive_bind_s: Invalid credentials (49)
How can i resolve this.
I have another query...in the command "$ORACLE_HOME/bin/ldapmodify -h oidHost -p OIDPortNumber -D "cn=oracle" -w password -f csPlugin.ldif" which user name should i specify..... is it "cn=oracle" or "cn=orcladmin"
Thanks
peter.Hi Raford,
Thanks for your reply.
We tried to create Content Database Source with the details we have...
However in this process getting an exception....
11:20:20:778 INFO main
11:20:20:784 INFO main Oracle Secure Enterprise Search, Crawler: Release 10.1.8.2
11:20:20:785 INFO main Copyright © 2006, 2007, Oracle. All rights reserved.
11:20:20:785 INFO main
11:20:20:785 INFO main ================== Crawling settings ==================
11:20:20:785 INFO main Reading configuration file from /mnt/u08/SOADEVIL/seshome/search/data/config/crawler.dat
11:20:20:785 INFO main Agent = Oracle Secure Enterprise Search
11:20:20:807 INFO main User = EQ_TEST
11:20:20:807 INFO main Database connect string = jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=devilrays.appsassociates.com)(PORT=1525))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=Devilses.devilrays.appsassociates.com)))
11:20:20:807 INFO main Source type is User-defined
11:20:20:807 INFO main Source is "BJ_Cont"
11:20:20:807 INFO main Document access control policy is user-defined
11:20:20:808 INFO main Number of crawling threads = 5
11:20:20:808 INFO main Queue table = I1S8
11:20:20:808 INFO main URL table = EQ$URL
11:20:20:808 INFO main Maximum documents to crawl = no limit
11:20:20:808 INFO main Maximum depth to crawl = 2
11:20:20:808 INFO main Document size limit = 10M
11:20:20:808 INFO main Locale of the crawler message is "en_US"
11:20:20:808 INFO main URL exclusion rule = (?i:(?:\.gif)|(?:\.jpg)|(?:\.jar)|(?:\.tif)|(?:\.bmp)|(?:\.war)|(?:\.ear)|(?:\.mpg)|(?:\.wmv)|(?:\.mpeg)|(?:\.scm)|(?:\.iso)|(?:\.dmp)|(?:\.dll)|(?:\.cab)|(?:\.so)|(?:\.avi)|(?:\.wav)|(?:\.mp3)|(?:\.wma)|(?:\.bin)|(?:\.exe)|(?:\.iso)|(?:\.tar)|(?:\.png))$
11:20:20:808 INFO main URL exclusion rule = \?.*(.*\+)\1{3}
11:20:20:812 INFO main Document read timeout threshold = 30 second(s)
11:20:20:812 INFO main Crawler default character set is "8859_1"
11:20:20:812 INFO main Crawler default language is "en"
11:20:20:813 INFO main Auto language detection is on
11:20:20:813 INFO main Auto character set detection is off
11:20:20:813 INFO main Document service pipeline is "Default pipeline"
11:20:20:813 INFO main Verbose mode is on
11:20:20:935 INFO main Caching on: directory = /mnt/u08/SOADEVIL/sesdata/Devilses/cache/I1DS8/, max size = 250, action = SES_TASK
11:20:20:935 INFO main Filtering on: filter path = /mnt/u08/SOADEVIL/seshome/ctx/bin/ctxhx, number of filters = 2
11:20:20:935 INFO main MIME inclusions = text/html text/plain application/pdf application/x-msexcel application/vnd.ms-excel application/ms-excel application/x-mspowerpoint application/vnd.ms-powerpoint application/msword
11:20:20:935 INFO main URL table attributes = url, depth, signature, last_modified, status, url_id, access_url, enqueue_status, TITLE, DESCRIPTION, AUTHOR, CRAWLED_DATE, CONTENT_LENGTH, CONTENT_TYPE, LANG, CACHE_FILE_PATH, DS_ID
11:20:20:936 INFO main SQL callback statement is "begin eq_crw.crawler_callback(?,?,?,?); exception when eq_def.search_error then eq_err.raise; when others then eq_err.raise; end;"
11:20:20:936 INFO main Cookie support is enabled
11:20:20:937 INFO main Maximum number of cookies = 300
11:20:20:939 INFO main Maximum number of cookies per host = 20
11:20:20:939 INFO main Maximum size of cookie = 4096 bytes
11:20:20:940 INFO main Cache file deletion is disabled
11:20:20:940 INFO main Crawler plug-in manager class is "oracle.search.plugin.ocs.cservices.OCSCSPluginMgr"
11:20:20:940 INFO main SQL hook ID is "8"
11:20:20:940 INFO main SQL command hook statement is "begin ? := eq_crw.crawler_get_command(?,?,?,?); end;"
11:20:20:940 INFO main SQL response hook statement is "begin ? := eq_crw.crawler_send_response (?,?,?,?,?,?,?,?,?,?,?,?,?); end;"
11:20:20:940 INFO main Crawler launched by schedule "BJ_Cont"
11:20:20:940 INFO main
11:20:20:940 INFO main =================== Crawling status ===================
11:20:20:941 INFO main Crawling started at 9/18/07 11:20 AM
11:20:21:912 INFO main URL manager connecting to Oracle...
11:20:21:974 INFO main connected
11:20:22:586 INFO main Queue manager connecting to Oracle...
11:20:22:631 INFO main connected
11:20:23:497 INFO main Invoking "oracle.search.plugin.ocs.cservices.OCSCSPluginMgr"
11:20:23:501 INFO main URL manager connecting to Oracle...
11:20:23:529 INFO main connected
11:20:23:531 INFO main Initializing crawler plug-in manager "oracle.search.plugin.ocs.cservices.OCSCSPluginMgr"
11:20:23:531 ERROR main SES keystore location: null
11:20:23:532 ERROR main null oracle.search.sdk.crawler.PluginException oracle.search.plugin.ocs.cservices.OCSCSPluginMgr:getParamValue:351 oracle.search.plugin.ocs.cservices.OCSCSPluginMgr:init:479 oracle.search.crawler.WebCrawler:begin:1076 ImtCrawler:run:1831 ImtCrawler:main:480
11:20:23:532 ERROR main null oracle.search.sdk.crawler.PluginException oracle.search.plugin.ocs.cservices.OCSCSPluginMgr:getParamValue:351 oracle.search.plugin.ocs.cservices.OCSCSPluginMgr:init:479 oracle.search.crawler.WebCrawler:begin:1076 ImtCrawler:run:1831 ImtCrawler:main:480
11:20:23:676 INFO Thread-1 Remote command "reportstatistics" received, argument = "quit"
11:20:23:676 INFO Thread-1 Executing remote command "reportstatistics"
11:20:23:697 INFO Thread-1 Send back remote command execution result
11:20:25:944 INFO main Shutting down all crawling threads...
11:20:25:948 INFO main
11:20:25:949 INFO main =================== Crawling results ===================
11:20:25:949 INFO main Crawling started at 9/18/07 11:20 AM
11:20:25:949 INFO main Crawling stopped at 9/18/07 11:20 AM
11:20:25:949 INFO main Total crawling time = 0:0:5
11:20:25:949 INFO main
11:20:25:954 INFO main Total number of documents fetched = 0
11:20:25:954 INFO main Document fetch failures = 0
11:20:25:954 INFO main Document conversion failures = 0
11:20:25:954 INFO main Total number of unique documents indexed = 0
11:20:25:954 INFO main Total data collected = 0 bytes
11:20:25:954 INFO main Total number of non-indexable documents = 0
11:20:25:955 INFO main
11:20:25:955 INFO main Number of times disk cache is full = 0
We have followed the installation details provided in "SESAdmiistratorGuide".
In that guide.... during creation of Content Database source he did not mention any entry for "SES keystore location", and the exception which we are getting is related to "SES keystore location: null" (please look into the exception stack).
could you please guide us.
Thanks
peter. -
Error during DataBase source creation in SES.
Hi Experts,
As part of creating DataBase source for SES...
We created a table testing_data_for_ses(URL,CONTENT,LASTMODIFIEDDATE,KEY,LANG)
and also the view
create or replace view view_testing_data_for_ses AS
SELECT 'docserver?docid=' || URL URL,
CONTENT CONTENT,
lastmodifieddate lastmodifieddate,
KEY KEY,
'en' LANG
FROM testing_data_for_ses;
Finally we tried to create DataBase source in SES with following parameter names and values
Database Connection String: jdbc:oracle:thin:@<systemIP>:<port>:<SID>
User ID : apps
Password : apps
View : view_testing_data_for_ses
Document Count : -1
Query : select content from testing_data_for_ses
URL Prefix : http://<SES-Hostname>:<SES-Port>
However in this process we ended up with following Error:
09:55:53:750 INFO main
09:55:53:761 INFO main Oracle Secure Enterprise Search, Crawler: Release 10.1.8.2
09:55:53:761 INFO main Copyright © 2006, 2007, Oracle. All rights reserved.
09:55:53:761 INFO main
09:55:53:761 INFO main ================== Crawling settings ==================
09:55:53:761 INFO main Reading configuration file from /mnt/u08/SOADEVIL/ses/seshome/search/data/config/crawler.dat
09:55:53:762 INFO main Agent = Oracle Secure Enterprise Search
09:55:53:800 INFO main User = EQ_TEST
09:55:53:800 INFO main Database connect string = jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=hostname)(PORT=1525))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=DEVIL1.hostname)))
09:55:53:800 INFO main Source type is User-defined
09:55:53:800 INFO main Source is "DatabaseSource_B"
09:55:53:800 INFO main Number of crawling threads = 5
09:55:53:800 INFO main Queue table = I1S3
09:55:53:801 INFO main URL table = EQ$URL
09:55:53:801 INFO main Maximum documents to crawl = no limit
09:55:53:801 INFO main Maximum depth to crawl = 2
09:55:53:801 INFO main Document size limit = 10M
09:55:53:801 INFO main Locale of the crawler message is "en_US"
09:55:53:801 INFO main URL exclusion rule = (?i:(?:\.gif)|(?:\.jpg)|(?:\.jar)|(?:\.tif)|(?:\.bmp)|(?:\.war)|(?:\.ear)|(?:\.mpg)|(?:\.wmv)|(?:\.mpeg)|(?:\.scm)|(?:\.iso)|(?:\.dmp)|(?:\.dll)|(?:\.cab)|(?:\.so)|(?:\.avi)|(?:\.wav)|(?:\.mp3)|(?:\.wma)|(?:\.bin)|(?:\.exe)|(?:\.iso)|(?:\.tar)|(?:\.png))$
09:55:53:801 INFO main URL exclusion rule = \?.*(.*\+)\1{3}
09:55:53:801 INFO main Document read timeout threshold = 30 second(s)
09:55:53:801 INFO main Crawler default character set is "8859_1"
09:55:53:801 INFO main Crawler default language is "en"
09:55:53:802 INFO main Auto language detection is on
09:55:53:802 INFO main Auto character set detection is off
09:55:53:802 INFO main Document service pipeline is "Default pipeline"
09:55:53:802 INFO main Verbose mode is on
09:55:53:848 INFO main Caching on: directory = /mnt/u08/SOADEVIL/ses/sesdata/DEVIL1/cache/I1DS3/, max size = 250, action = SES_TASK
09:55:53:848 INFO main Filtering on: filter path = /mnt/u08/SOADEVIL/ses/seshome/ctx/bin/ctxhx, number of filters = 2
09:55:53:849 INFO main MIME inclusions = text/plain text/html application/pdf application/x-msexcel application/vnd.ms-excel application/ms-excel application/x-mspowerpoint application/vnd.ms-powerpoint application/msword
09:55:53:849 INFO main URL table attributes = url, depth, signature, last_modified, status, url_id, access_url, enqueue_status, TITLE, DESCRIPTION, AUTHOR, CRAWLED_DATE, CONTENT_LENGTH, CONTENT_TYPE, LANG, CACHE_FILE_PATH, DS_ID
09:55:53:849 INFO main SQL callback statement is "begin eq_crw.crawler_callback(?,?,?,?); exception when eq_def.search_error then eq_err.raise; when others then eq_err.raise; end;"
09:55:53:849 INFO main Cookie support is enabled
09:55:53:850 INFO main Maximum number of cookies = 300
09:55:53:850 INFO main Maximum number of cookies per host = 20
09:55:53:850 INFO main Maximum size of cookie = 4096 bytes
09:55:53:851 INFO main Cache file deletion is disabled
09:55:53:851 INFO main Crawler plug-in manager class is "oracle.search.plugin.db.DBCrawlerManager"
09:55:53:851 INFO main SQL hook ID is "3"
09:55:53:851 INFO main SQL command hook statement is "begin ? := eq_crw.crawler_get_command(?,?,?,?); end;"
09:55:53:851 INFO main SQL response hook statement is "begin ? := eq_crw.crawler_send_response (?,?,?,?,?,?,?,?,?,?,?,?,?); end;"
09:55:53:851 INFO main Crawler launched by schedule "DatabaseSource_B"
09:55:53:851 INFO main
09:55:53:851 INFO main =================== Crawling status ===================
09:55:53:852 INFO main Crawling started at 10/3/07 9:55 AM
09:55:55:463 INFO main URL manager connecting to Oracle...
09:55:55:524 INFO main connected
09:55:56:712 INFO main Time of last crawl is Wed Oct 03 09:44:11 EDT 2007
09:55:56:755 INFO main Queue manager connecting to Oracle...
09:55:56:853 INFO main connected
09:55:58:088 INFO main Invoking "oracle.search.plugin.db.DBCrawlerManager"
09:55:58:092 INFO main URL manager connecting to Oracle...
09:55:58:241 INFO main connected
09:55:58:243 INFO main Initializing crawler plug-in manager "oracle.search.plugin.db.DBCrawlerManager"
09:55:58:245 ERROR main EQP-80401: Cannot specify both view and query oracle.search.sdk.crawler.PluginException oracle.search.plugin.appsjdbc.AppsJdbcPluginMgr:init:255 oracle.search.plugin.appsjdbc.SecureAppsJdbcPluginMgr:init:50 oracle.search.crawler.WebCrawler:begin:1076 ImtCrawler:run:1831 ImtCrawler:main:48009:55:58:484 INFO Thread-1 Remote command "reportstatistics" received, argument = "quit"
09:55:58:484 INFO Thread-1 Executing remote command "reportstatistics"
09:55:58:506 INFO Thread-1 Send back remote command execution result
09:55:58:852 INFO main Shutting down all crawling threads...
09:55:58:855 INFO main
09:55:58:855 INFO main =================== Crawling results ===================
09:55:58:855 INFO main Crawling started at 10/3/07 9:55 AM
09:55:58:856 INFO main Crawling stopped at 10/3/07 9:55 AM
09:55:58:856 INFO main Total crawling time = 0:0:5
09:55:58:856 INFO main
09:55:58:877 INFO main Total number of documents fetched = 0
09:55:58:879 INFO main Document fetch failures = 0
09:55:58:880 INFO main Document conversion failures = 0
09:55:58:880 INFO main Total number of unique documents indexed = 0
09:55:58:880 INFO main Total data collected = 0 bytes
09:55:58:880 INFO main Total number of non-indexable documents = 0
09:55:58:880 INFO main
09:55:58:880 INFO main Number of times disk cache is full = 0
Are we specifying any wrong parameter values.
Thanks
parker.Hi raford,
Thanks for your reply.
We just provided the view name....and hence the DataBase source got created successfully.
Now we have two scenarios here
1)
DataBase source in SES with parameter value for URL Prefix : http://<SES-Hostname>
Now when we searched for content... The SES gets us the results....
However when we clicked on the searched result(which is http://<SES-HostName>:<SES-port>/search/query/redirect.jsp?qid=161&did=2001&pos=1&idx=1&fid=)...it says cannot find server...but when i click on cached link(which is http://devilrays.appsassociates.com:7782/search/query/cache.jsp?id=2001&q=row3&fid=)... i could see the whole content.
2)
DataBase source in SES with parameter value for URL Prefix : http://<SES-Hostname>:<SES-Port>
Now when we searched for content... The SES gets us the results....
However when we clicked on the searched result(which is http://<SES-Hostname>:<SES-Port>/search/query/redirect.jsp?qid=151&did=1901&pos=1&idx=1&fid=)...it says HTTP 404 not found...but when i click on cached link(which is http://devilrays.appsassociates.com:7782/search/query/cache.jsp?id=1901&q=row3&fid=)... i[b] could see the whole content.
Are there any changes i need to do so that when i click on search result... it gets me the content.
Thanks
parker.
Maybe you are looking for
-
Acrobat 6.0 Professional Install Error
Hello, I just did a fresh install of Windows XP Home Edition, and when I attempted to reinstall Acrobat 6.0 Professional I received the following error message approximately 85-90% into the install process: "Internal error 2753. Dist_acrodist.exe" Do
-
Can purchased apps download to more than one iPad
I am in a school setting. We have purchased several iPads. If using the same Apple ID, can I download previously purchased apps to more than one iPad?
-
Generate Score in LifeCycle Designer
Hi! Is it possible to create an interactive form in Life Cycle Designer where the results can be scored and sent to the instructor. Zee
-
I have downloaded and unzipped JDeveloper via: Patch 8431482 10G Jdeveloper with OA Extension ARU for R12.1.1 The JDeveloper I am using is: Studio Edition Version 10.1.3.3.0.3, Build JDEVADF_10.1.3.3.0_NT_RELEASE On working through the tutorials, we
-
My whole iTunes library is lost! Help!
Hello. After not checking my computer for two days I relaized last night that my iTunes library has been completely deleted - all my playlists, songs (both those songs purchased and my own CD burns) are gone. When opening iTunes, it behaved as if it