How to enable Sql Dependency OnDataChange event to handle multiple request at a time

when we work with sql dependency then we work with OnDataChange event and this event notify us regarding data change in table. suppose my application monitor a
test table by using sql dependency. suppose huge number of data is getting insert and updated in
test table very frequently. so i do not know how sql dependency
OnDataChange event can handle this situation because OnDataChange event will fire as many as time data will be change in db table.
here is my snip for onchange event
void OnDataChange(object sender, SqlNotificationEventArgs e)
((SqlDependency)sender).OnChange -= OnDataChange;
BBALogger.Write("PartIndexer Service RegisterNotification called end", BBALogger.MsgType.Info);
if (e.Source == SqlNotificationSource.Timeout)
MailSend(); // notification mail send
BBALogger.Write("PartIndexer Service SqlNotificationSource.Timeout error", BBALogger.MsgType.Error);
Environment.Exit(1);
else if (e.Source != SqlNotificationSource.Data)
MailSend(); // notification mail send
BBALogger.Write("PartIndexer Service SqlNotificationSource.Data", BBALogger.MsgType.Error);
Environment.Exit(1);
else if (e.Type == SqlNotificationType.Change)
StartIndex();
BBALogger.Write("PartIndexer Service Data changed", BBALogger.MsgType.Info);
else
BBALogger.Write(string.Format("Ignored change notification {0}/{1} ({2})", e.Type, e.Info, e.Source), BBALogger.MsgType.Warnings);
RegisterNotification();
please help me to design my OnDataChange event such was if data is changed very frequently in test table then
OnDataChange can handle the situation. OnDataChange event should not be freeze and can log each data change in xml file.
i am just looking for guidance like how to design OnDataChange as a result it could handle and log data when huge number of user will change data in test table frequently. thanks

Hi,
You should be able to delete all nodes selected by an XPath expression... Have a look at this...
http://docs.oracle.com/cd/E28280_01/dev.1111/e15866/ui_ref.htm#i1290003
Cheers,
Vlad

Similar Messages

  • How biztalk handle multiple request at a time ?

    can TCP/IP adapter or biztalk handles multiple request at a time ?
    If yes,then how it process multiple request ? 
    Can TCP/IP send ports sends multiple request ?
    Prakash

    Yes.
    It processes multiple requests using THREADS. Each Connect starts off a thread that handles the receipt of the message, submission to BizTalk, wait for the response (matching two-way subscription) and then respond back to the client.
    TCP/IP Send ports handle multiple requests by creating fresh sockets (RPC High-end ports). As an example, in your browser you open multiple tabs and access different sites, each tab results in your browser opening a fresh socket connection for the request.
    Regards.

  • How to handle multiple requests to the same servlet at one time?

    Hi,
    I am new to Servlets. I have doubt regarding ... Handling multiple requests to a servlet at a time.
    If we send a single request to a servlet, as know that group of objects such as servlet, servletContext, servletConfig, request, response and etc are created in the server, And if 1000's of requests are sent to a same servlet at a time, and if server memory capacity is less, then 1000's of objects are created in a server which would be heavy burden to Server. How to handle the application and development in such situation?
    Kind regards,
    veerendra

    Hi veerendra reddy ,
    By default any web server can will have a thread pool to handle client req's.
    In your point also heavy burden to server you are telling that depends on this.
    we can configure this min & max size of this thread pool.
    by default it will be 0-1000 for tomcat server.
    I am not sure in which file this configuration will be.
    But I hope in server.xml or some xml file consists this info.
    If You what you can edit accordingly. to overcome your heavy burden to server.
    Thanks & Regards
    Nagendra

  • How to handle multiple request in the servlet

    how to handle multiple request in the servlet...
    Example:
    java forum...
    i'm login in the java forum at this time 1000 members make login in this....how happended in servlet?
    if we use thread how to implement in servlet ?

    Serlets are already threaded. The application container instantiates the servlet, then uses this instance in a new thread for every use.
    This is the reason that you should use (almost) no instance variables in a Servlet, but rather that (almost) everything should be local to the method.

  • SQL dependency OnChange event constantly when using a specific database on SQL server

    Hello
    I did some prototype dev using a new db I created on our dev SQL server instance and OnChange events only when the underlying data was changed. I tried the same thing with another database on the same server which is a replica of our live database. With
    this it just kept firing the event regardless of what activity there was in the table. I even created a totally empty table and used that for the query and it still fired on an empty table.
    Is there anything obvious that I need to do to this database to stop this? I'm pretty sure my c#is ok just confused by this
    Thanks,
    Dave.

    On the db where it works the properties in the SqlNotificationEventArgs are different to the one that does not work:
    So it looks as though for some reason it never gets to subscribe to this event.
    I tried using ssbdiagnose but to be honest I don't know what the From Service and To Service parameters are in my case.
    Here's what I got anyway:
    C:\Program Files\Microsoft SQL Server\100\Tools\Binn>ssbdiagnose -E -d BMC_Ecomm
    erce CONFIGURATION FROM SERVICE /test/initiator TO SERVICE /test/target
    Microsoft SQL Server 10.50.1600.1
    Service Broker Diagnostic Utility
    D  29997 W28SDEV05       Transport       Service Broker GUID is identical to tha
    t of database DynamicRouting on server W28SDEV05
    D  29997 W28SDEV05       Transport-TempRename Service Broker GUID is identical t
    o that of database DynamicRouting on server W28SDEV05
    D  29912 W28SDEV05       BMC_Ecommerce   Service /test/initiator was not found
    D  29912 W28SDEV05       BMC_Ecommerce   Service /test/target was not found
    D  29931 W28SDEV05       BMC_Ecommerce   There is no route for service /test/tar
    get
    D  29931 W28SDEV05       BMC_Ecommerce   There is no route for service /test/ini
    tiator and broker instance BB64B7AA-5C39-404B-B7A9-81D3756A4C60
    D  29964 W28SDEV05       BMC_Ecommerce   The master key was not found
    7 Errors, 0 Warnings
    Worth noting that the one that worked gets the same results with ssbdiagnose 
    SELECT service_broker_guid
    FROM sys.databases
    WHERE database_id = DB_ID(); 
    ran in DynamicRouting gives : 4AC2C25B-E612-44B2-BC43-687F918ABD16
    SELECT service_broker_guid
    FROM sys.databases
    WHERE database_id = DB_ID(); 
    ran in BMC_Ecommerce gives : BB64B7AA-5C39-404B-B7A9-81D3756A4C60

  • How to enable an existing Extended Events Session or add a new Session?

    Hi,
    I am using Management Studio version 12.0.2000.8 and I have noticed that Extended Events for Azure SQL DB have been added to it.
    However, I can't add a new session because the option is grayed out in the dropdown menu. Also, the existing sessions return an error when I attempt to start them. Here is one example of starting
    azure_xe_query session:
    Failed to start event session 'azure_xe_query' because required credential for writing session output to Azure blob is missing. (Microsoft SQL Server, Error: 25739)
    I have an automated export assigned to my Azure database, so the database must be using a (blob) storage account. Is this the same storage account which Extended Events are trying to reach? So far, my best guess is that the storage key should be provided
    while starting the session. This, obviously can't be done using the GUI.
    The only thing I managed to google about this topic is
    this blogpost from May. 
    Has anybody else tried to profile their Azure DB using Extended Events? Is this feature still in development?
    Thank you,
    Filip

    Hi Bob, thank you for replying.
    You mentioned 12 pre-configured event sessions. May I ask, which version of Management Studio were you using? For some reason, I only see 5 of them:
    azure_xe_errors_warnings
    azure_xe_object_ddl
    azure_xe_query
    azure_xe_query_detail
    azure_xe_waits
    And each fires an error just like the one in the first post. At the moment, viewing live data from 'xe_query' session would be enough for me. If I could only start it somehow ...
    I should probably mention I have tried to do this on a Basic and a Standard service tier. Not yet with a Premium.
    Since there is probably nothing we can do at the moment, I'm going to mark your reply as an answer. Thnx again.

  • How can I make the "add event" dialog in Lightning use 12-hour times?

    The Add Event dialog in Lightning (on an iMac running OS 10.10.2 Yosemite) is displaying 24-hour times in the dropdown boxes. I need these to be in 12-hour format.
    Also, the default calendar needs to be changed. Where are these preferences located?

    I don't know what the acceptable setting values are, but you could experiment with
    ''calendar.date.format''
    in the config editor. '''[http://kb.mozillazine.org/Menu_differences_in_Windows,_Linux,_and_Mac Tools|Options]'''|Advanced|General→Config editor
    Mine is set to 1 and it's faithfully copying the date/time format I use elsewhere, but that may just be coincidence. But I suspect it is simply the toggle between long and short date formats as offered in the Options GUI for the calendar.
    Bear in mind that all those AM/PM indicators will eat up precious screen real estate.
    Settings for the Calendar are under Tools|Options (on Windows); that'll be Edit|Preferences or Thunderbird |Preferences.
    '''[http://kb.mozillazine.org/Menu_differences_in_Windows,_Linux,_and_Mac Tools|Options]'''

  • How to handle multiple requests from single client??

    hi all
    I wrote a client server program to handle requests from client.I have 2 types of requests, one is to submit comments to the server other is to view comments on the server.I have tested the app and it works fine for either of them(independently) but they don't work both together i.e when i submit a comment and view it,it's stuck and when i close the program it gives SocketException :Connection reset.
    on client side:
    My request is just a string
    on the server side:
    I check the string and give the client what it wants.
    I want to know if there's any other way to send requests other than passing it as a string.
    I can post my code if needed.
    thanks,
    Sree

    Here is my client code,minimized it to the extent possible and it might give some compilation problems since i didn't include all the functions needed but i think you should be able to get an idea if i'm doing something wrong.
    Can give you my server code if needed.
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.net.Socket;
    import java.net.UnknownHostException;
    import javax.swing.JButton;
    public class Test {
         JButton submit_button;
         JButton view_button;
         Socket client;
          JButton get_submit_button() {
                   if (submit_button == null) {
                        submit_button = new JButton();
                        submit_button.setText("Submit");
                        submit_button.addActionListener(new java.awt.event.ActionListener() {
                             public void actionPerformed(java.awt.event.ActionEvent e) {
                                  send_comments_to_server();
                   return submit_button;
               Socket check_client_connection(){
                   String host = "C001192097";     //server host name
                   if(client == null || client.isClosed()){
                    try {
                         client  = new Socket(host, 4321);
                    }catch (UnknownHostException exception){
                         System.err.println(host + ": unknown host.");
                    catch (IOException exception){
                         System.err.println("I/O error with " + host);
                   return client;
              void send_comments_to_server(){
                    try
                         Socket client = check_client_connection();
                         DataOutputStream output_stream = new DataOutputStream(client.getOutputStream());
                         BufferedReader stream_input = new BufferedReader(new InputStreamReader(client.getInputStream()));
                         String comment_report = "comments";
                         Comments comment = new Comments();
                         User_Data user_data = new User_Data(); //function that returns client details such as host name and stuff
                         String user_info = "User Name: "+user_data.user_name+" "+"Host Name: "+user_data.host_name+" "+"Domain Name: "+ user_data.domain_name;
                         comment.user_info = user_info;
                         comment.summary = comment_report;
                         comment.comments = "passing comments";
                         String report = user_info+" "+comment_report+" ";
                         output_stream.writeBytes(report+"\n");
    //                     output_stream.close();
    //                     stream_input.close();
    //                     client.close();
                    }catch(IOException e){
                         e.printStackTrace();
              void receive_comments_from_server(){
                   String line;
                   StringBuffer comments = new StringBuffer();
                   try
                         Socket client = check_client_connection();
                         DataOutputStream output_stream = new DataOutputStream(client.getOutputStream());
                         BufferedReader stream_input = new BufferedReader(new InputStreamReader(client.getInputStream()));
                         String msg = "view comments";
                         output_stream.writeBytes(msg);
                         System.out.println("waiting for response");
                             while((line = stream_input.readLine()) != null){
                                  comments.append(line);
                              System.out.println("Comments from server "+comments);     
                        } catch (IOException e) {
                             e.printStackTrace();
              JButton get_view_button() {
                   if (view_button == null) {
                        view_button = new JButton();
                        view_button.setText("View Comments");
                        view_button.addActionListener(new java.awt.event.ActionListener() {
                             public void actionPerformed(java.awt.event.ActionEvent e) {
                                  System.out.println("request sent");
                                  receive_comments_from_server();
                   return view_button;
    }thanks
    Sree

  • How to disable a custom designed Tx code for multiple user at a time

    Hii ,
    I have designed a screen in module pool for end user to make entries in the screen and when he saves the data is saving in standard table and ztable. the main field in the screen is Batch number..from that batch  number bag number will be generated. and consumed quantity will be saved in that bag no.Bag number will be generated like first 5 digits of batch number and bag number series of that batch number. for example if batch number is 12345 and already 5 times packing is done for same batch..last bag number in the ztable will be 123450005.so next time when user tries to pack using same batch number the new bag number will be 123450006 for batch 12345.Problem here is when user tries to make enrties in that Tx code and at the same time if another user opens same Tx code to make packing for same batch both of them are getting same bag numbers before saving.
    I have called Enqueue and Dequeue FM's but still at a time for same batch user is able to do the packing.now my issue is i want to restrict 2 user to use same batch while packing in that Tx code.
    I have written following code for enqueue and dequeue technics
    data: B_matnr type mara-matnr,
           B_charg type mchb-charg.
    data : i_temp type TABLE OF zpackhdr WITH HEADER LINE,
           i_temp1 type TABLE OF zpackhdr WITH HEADER LINE.
    move : 1110 to WA_BCH-werks,
           chk_matnr1 to WA_BCH-matnr,
           v_bcharg to WA_BCH-charg,
           vgrade to WA_BCH-grade,
           new_batch to WA_BCH-bagno,
           m_baleno to WA_BCH-baleno,
           b_date to WA_BCH-indat.
    APPEND wa_bch to i_bch.
    clear b_date.
    READ TABLE i_bch INTO wa_bch INDEX 1.
        B_MATNR = WA_BCH-matnr.
        B_CHARG = WA_BCH-bagno.
    concatenate  B_matnr B_charg  into
        WA_BCH-objek respecting blanks .
       modify I_BCH from WA_BCH index sy-tabix.
    CLEAR: B_MATNR,
               B_CHARG.
    call function 'ENQUEUE_EMMCH1E'
    EXPORTING
       MODE_MCH1            = 'E'
       MANDT                = SY-MANDT
       MATNR                = WA_BCH-MATNR
       CHARG                = WA_BCH-BAGNO
    if sy-subrc <> 0.
    endif.
    call function 'DEQUEUE_EMMCH1E'
    EXPORTING
       MODE_MCH1       = 'E'
       MANDT           = SY-MANDT
       MATNR           = WA_BCH-MATNR
       CHARG           = WA_BCH-CHARG

    I do understand what u say...mine is a custom designed screen...when i open that screen i have around 15 input fields in which batch is obligatroy...when i give batch and hit enter all the other fields will be filled automatically picking from the table which are relevant for that batch..for example..material,order etc are picked from table...and bag number field will be generated taking first 5 digits of batch and followed by 0001 if its afirst time entry for that batch....so when a user is opening that screen in 2 different windows and giving details without saving any of the screens...in both screens bag number is generating as 001...and when saving it ..its saving 2 entries with same bag number...so i have created a lock entry for afpo table taking order field...so when a user opens 2 screens with same batch...and giving entries in those 2 screens without saving..he is getting same bag numbers as 001.....now when user saving the first screen and coming to second screen to save...he is gettimg message 'ORDER CURRENTLY BEING PROCESSED'..but after the data gettng saved in first screen,then when he saves the second screen it is getting saved...with same bag numbers as 001.so my issue is here...when he saves first screen and comes to second screen to save it the user should get that error message and should come out of the screen....so that he can make a fresh entry for that batch and bag number will be generated as 002 for that batch...
    Regards,
    venkat.

  • How to create Dynamic Tab in ADF, to achive multiple transaction at a time

    Hi,
    I want to create Dynamic tab in ADF, to achieve Multiple transaction at a time by opening new tab for a transaction.
    For Example: User can order multiple product at the same time by opening the order form in multiple TAB.
    Scenario:
    i) When user will click on addNewTab, new tab will be added.
    ii) If user Click on close btn on Tab, Tab will be closed (Transaction will be removed).
    iii) user can save all transaction( can save multiple product Order in different tab.)
    iv) when user select any product in form, Rename the Tab name as well.
    Need Help on this :(
    Thanks & Regards
    Pratap Rudra

    Hi Rudra,
    You can implement all your problem using Tab API .
    When you are closing the tab you can roll back transaction which you want.
    Tab API will give control over closing and opening tab.
    And also you can give tab name while opening the tab.
    Thanks
    Prateek

  • Enable SQL Tracing for Session

    Hi,
    I know how to enable SQL tracing for a session created either through SQL*Plus or like similar tool, but I want to explore is there any way to can we enable sql tracing for a single session which is connected to database through an application.
    ssome time for testing purpose we have a requirement to enable tracing for that user which run batch Job. Now that particular user gets connected to database through application and i want to enable tracing right at that moment. How can I accomplish it.
    Regards,
    Ababsi

    If you don't want to identify database session you can try to create a logon trigger to enable tracing for all database sessions created by a specific Oracle user account. In the following example you need to replace UWCLASS with the Oracle user account for which you want to trace sessions:
    CREATE OR REPLACE TRIGGER trace_trig
    AFTER LOGON
    ON DATABASE
    DECLARE
    sqlstr VARCHAR2(200) := 'ALTER SESSION SET EVENTS ''10046 TRACE NAME CONTEXT FOREVER, LEVEL 12''';
    BEGIN
      IF (USER = 'UWCLASS') THEN
        execute immediate sqlstr;
      END IF;
    END trace_trig;
    /Reference:
    http://psoug.org/reference/system_trigger.html
    If you want to identify database session you need to query V$SESSION to retrieve SID and SERIAL# of the session you want to trace and then you can use DBMS_MONITOR. See examples in http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php
    Edited by: P. Forstmann on 15 janv. 2011 11:07

  • How to capture the Status code in Web application Transcation monitoring if we are using multiple Request

    Hi Team
    We would like to monitor 12 url,s which requires Authentication. Hence i have added the same in one Single Web application transcation template.
    i have added the below info to the get the Stats code displayed in Alert
    Status code is $Data/Context/RequestResults/RequestResult["1"]/BasePageData/StatusCode$
    when i recived a alert it gave the Status code of the 1st Request
    hence i changed the same as
    Status code is $Data/Context/RequestResults/RequestResult["12"]/BasePageData/StatusCode$
    But still i am facing the same issue .
    My first request shows me a status code of 200, and my 12th Request comes with 500 but in the alert i get 200 but it should be 500.
    Kindly help me in how i can get the Status code for the multiple  Request.
    Regards
    Sriram

    Hi Sriram,
    Please run the test of your 12th Request, view full result and check if Status Code is 200.
    Meanwhile, you can run the URL manually to check the result.
    Niki Han
    TechNet Community Support

  • How do I make groups for texting multiple people at a time and retain that group for future use?

    How do I make goups, in Contacts, for texting multiple people at a time and retain that group for future use?

    How do I make goups, in Contacts, for texting multiple people at a time and retain that group for future use?

  • How to enable the Exchange 2010 Admin Audit logs in Event Viewer

    How to enable the Exchange 2010 Admin Audit(Mailbox Auditing) logs in Event Viewer.
    - Sivashankar. Please mark as answer/useful if my contribution is helpful

    Hi Siva,
    We could execute the command below to view Administrator Audit Logging settings:
    Get-AdminAuditLogConfig
    If it is not enabled, please run the command below:
    Set-AdminAuditLogConfig -AdminAuditLogEnabled $True
    In addition, here are some references for you to utilize this feature:
    Configure Administrator Audit Logging :
    http://technet.microsoft.com/en-us/library/dd335109(v=exchg.141).aspx
    Search the Administrator Audit Log :
    http://technet.microsoft.com/en-us/library/ff459262(v=exchg.141).aspx
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to enable remote connections in SQL Server 2008

    I'm trying to enable remote connections in SQL Server 2008 R2 as described in the following article.  I see the error message at the top of the article. 
    http://blogs.msdn.com/b/walzenbach/archive/2010/04/14/how-to-enable-remote-connections-in-sql-server-2008.aspx
    One step in the article describes how to enable TCP/IP in Configuration Manager.  Specifically it says that
    'SQL Server NETWORK Configuration' should have TCP/IP enabled.
    The issue I've encountered is that my Configuration Manager
    is different than what appears in the article. My Configuration Manager shows the following:
    SQL Server 2005 Services
    SQL Server 2005 Network Configuration (32 bit)
           - Protocols for SQLExpress
    SQL Native Client Configuration (32 bit)
           - Client protocols
           - Aliases
    Note that I see 'SQL Server 2005 Network Configuration'
    rather than that for 2008.  When 'Protocols for SQLExpress'
    is expanded, there is a TCP/IP setting, but it's disabled and I see an
    Access Denied message if I try to enable this. 
    I also see a TCP/IP setting under Client protocols and successfully enabled this.  This uses port 1433 and I configured my firewall to accomodate this port as suggested in the article. 
    I also followed the other steps in the article, but still don't have remote access to SQL Server 2008 R2.  (I can access it from the office.)  I'm wondering if this remote access issue is because SQL Server
    2008 Network Configuration does not appear in Configuration Manager
    and if so, I'm interested in how this might be resolved.  (I'm running Windows 7 - 64 bit.)
    I'd appreciate any ideas on this.  Thanks. 

    Hello,
    Please refer to the following resource.
    http://support.microsoft.com/kb/KbView/914277
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

Maybe you are looking for