Synchronizing database query with update notifications via AQ

I am building a financial system and want to keep all my reference data in the database.
If one user updates a piece of data, I need all users that use that data to be notified of the change.
I know I can do this using triggers and publish-subscribe, but I have a synchronization problem:
A client comes up, queries initial value via select, then (or before) subscribe to updates.
Since the AQ channel is seperate from the regulal DB connection, I do not know if I missed an update notification that happened just after I queried, but before my subscription came into effect, or I might even get an update that is older then my query.
I know I can add sequance numbers to all updates, and force an initial update each time a new client connects, but that is both slow and complex.
Can anybody think of a simple way to have a database query synchronized with updates?

A query with different syntax would result in a different hash value.
Stored outlines work based on hash value.
Your question is probably answered now.
Sybrand Bakker
Senior Oracle DBA

Similar Messages

  • How can I set Firefox (in about:config?) to NEVER bother me with update notifications?

    Welp, the question says it all. Or almost all of it. I DETEST the latest, MENU-LESS version of Firefox (and it DOESN'T help that, by standing on my head and spitting wooden nails in a particular direction, I CAN actually find everything contained in the old menus), and therefore I force-installed the previous version (28.0), but my problem is that I am still pestered with prompts that urge me to upgrade to version 29.0. I resent THE HELL OUT OF THAT! I resent ANYTHING NANNY-LIKE that is IN MY FACE!
    So, I thought that by setting certain app.update parameters, I could be rid of that UPDATE SCOURGE - and in fact, it seems to have worked on my Linux-only desktop - but, alas, no, it is still there, still very much IN MY FACE on my dual-boot (openSUSE & Win7) desktop PC!
    What, then, can I do to be rid of those update prompts? (Note that I am hoping that at some point in a not too distant future, Mozilla will offer, for each new version, a WUS and an I'M THE MAN variant, where the latter allows the user to steer the vehicle, as it were... if this never materializes, then at some point (when I deem Firefox 28.0 to be too unstable to use any longer), I will ditch Firefox in favor of an alternative that retains a semblance of the male's hobby-garage look (as oppose to HER slick, everything-hidden, kitchen-cabinet look!).
    Thanks!
    I am running openSUSE 13.1 in dual-boot iwith Window 7, and it is only on the SUSE interface that I am having the problem (on Win7, earlier versions allow me to tick a 'don't install anything, ever' box via preferences, rather than having to seek a solution in about:config). Right now I am using Firefox 28.0, having force-downgraded from the latest version.

    The Link I gave you above won't tweak Firefox but rather give you a brief overview on what's new in Firefox 29.
    The link below will show you how to customize Firefox 29 to look like previous versions of Firefox before 29.
    *https://support.mozilla.org/en-US/kb/how-to-make-new-firefox-look-like-old-firefox
    I also mentioned you can toggle some prefs in about:config to disable automatic updating
    You can set these prefs in about:config to disable automatic updating:<br>
    app.update.auto - false<br>
    app.update.enabled - false<br>
    app.update.silent - false<br>

  • Enhance a SQL query with update of millions of rows

    Hi ,
    I have this query developed to updated around 200 million of rows on my production , I did my best but please need your recommendations\concerns to make it more enhanced
    DECLARE @ORIGINAL_ID AS BIGINT
    SELECT FID001 INTO #Temp001_
    FROM INBA004 WHERE RS_DATE>='1999-01-01'
    AND RS_DATE<'2014-01-01' AND CLR_f1st='SSLM'
    and FID001 >=12345671
    WHILE (SELECT COUNT(*) FROM #Temp001_ ) <>0
    BEGIN
    SELECT TOP 1 @ORIGINAL_ID=FID001 FROM #Temp001_ ORDER BY FID001
    PRINT CAST (@ORIGINAL_ID AS VARCHAR(100))+' STARTED'
    SELECT DISTINCT FID001
    INTO #OUT_FID001
    FROM OUTTR009 WHERE TRANSACTION_ID IN (SELECT TRANSACTION_ID FROM
    INTR00100 WHERE FID001 = @ORIGINAL_ID)
    UPDATE A SET RCV_Date=B.TIME_STAMP
    FROM OUTTR009 A INNER JOIN INTR00100 B
    ON A.TRANSACTION_ID=B.TRANSACTION_ID
    WHERE A.FID001 IN (SELECT FID001 FROM #OUT_FID001)
    AND B.FID001=@ORIGINAL_ID
    UPDATE A SET Sending_Date=B.TIME_STAMP
    FROM INTR00100 A INNER JOIN OUTTR009 B
    ON A.TRANSACTION_ID=B.TRANSACTION_ID
    WHERE A.FID001=@ORIGINAL_ID
    AND B.FID001 IN (SELECT FID001 FROM #OUT_FID001)
    DELETE FROM #Temp001_ WHERE FID001=@ORIGINAL_ID
    DROP TABLE #OUT_FID001
    PRINT CAST (@ORIGINAL_ID AS VARCHAR(100))+' FINISHED'
    END

    DECLARE @x INT
    SET @x = 1
    WHILE @x < 44,000,000  -- Set appropriately
    BEGIN
        UPDATE Table SET a = c+d where ID BETWEEN @x AND @x + 10000
        SET @x = @x + 10000
    END
    Make sure that ID column has a CI on.
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • When comparing database tables with lob columns via "Database diff" in different environments indexes are shown as different

    When using "Database diff" selecting other schemas only for compare own objects are shown too!Hi!
    For tables with lob columns (clob, blob, etc.) indexes with system names are automatically created per lob column.
    If I am on different database instances (eg. dev/test) these system names can differ and are shown as differences, but these is a false positive.
    Unfortunately there is now way to influence the index names.
    Any chance to fix this in sql developer?
    Best regards
    Torsten

    Only the Sql Dev team can respond to that question.
    Such indexes should ONLY be created by Oracle and should NOT be part of any DDL that you, the user, maintains outside the database since they will be created by Oracle when the table is created and will be named at that time.
    It is up to the Sql Dev team to decide whether to deal with that issue and how to deal with it.

  • Database replication with updatable materialized view in oracle 10gR2

    I neet to set up 1 central server and two local databases ....the local database will hold materialized view....now how to replicate data...in this scenario...please help as soon as possible...i am in rush.....
    the database i use is oracle 10g Release 2
    Edited by: user9932019 on Sep 4, 2009 2:25 AM

    It's not a process that can be explained in a forums posting. You have to understand the steps.
    Here are some other examples :
    http://www.orafaq.com/wiki/Scripts#Oracle_Advanced_Replication_Scripts

  • SQL Query with MS-Access Database

    Hi,
    I have linked my oracle database with MS-Access via a DB LINK. i can access the data from MS-ACCESS, but i have a problem that when i specify the column name or define a where clause in my query it gives me the error ORA-00904: invalid identfier ..
    This query fetch the data without any problem SELECT * FROM TBLREPORT@M_ACCESS but when i run SELECT EMP_ID FROM TBLREPORT@M_ACCESS it gives me the error i mentioned above. (Column name have No problem or mistake of spelling even CASE)
    also when i try to put where clause in the query it gives me same error SELECT * FROM TBLREPORT@M_ACCESS WHERE EMP_ID = '100' (Error)
    is there any change in SQL query for ACCESS database ??
    any clue
    Regards
    Rehman

    Are column/table names in access case sensitive? Issue
    DESC TBLREPORT@M_ACCESS If column EMP_ID actual name shows up in mixed/lower case, enclose it in double quotes and use the exact case. E.g., if column name shows up as Emp_Id, use:
    SELECT "Emp_Id" FROM TBLREPORT@M_ACCESSSY.

  • Is it possible to update a query with another query?

    I'm trying to update a query with another query (see attached
    code). Here's my setup: I've got a table in an Access database in
    which I enter a string into a form and update. This string
    corresponds to a single record in another table of the same
    datasource. The first table has only one record to provide the
    second, which has many and will have more. Basically what I'm
    wondering is: Is this a valid thing to do in coldfusion? If not
    please help with an alterate method. I'm still a novice at
    coldfusion.
    The overall effect I'm going for is to display the one record
    as a featured truck profile on the web site:
    www.truckerstoystore.net.
    I currently get an error when I try to display the page with the
    current query setup.
    Check this page to see the error:
    www.truckerstoystore.net/currentTOW2.cfm
    Help on this issue is very much appreciated.
    ------------------------------------------------------------------------------------------ -----------------------------------------------------------------------

    I think this is what you are after
    <!--- this query will get all the records from the DB
    --->
    <cfquery name="cTOW" datasource="tow">
    SELECT *
    FROM currentTOW
    <!--- Do you need to find a particular record in the
    database --->
    <!--- If so, then you need a 'where' clause in here
    --->
    </cfquery>
    <!-- Loop the cTOW query for each record returned -->
    <cfloop query="cTOW">
    <!--- For the record returned from the cTOW query you now
    need to update the table --->
    <!-- Update the table -->
    <cfquery name="currentTOW" datasource="tow">
    UPDATE Your tblName
    SET
    Dataname = cTOW.DataValue
    </cfquery>
    </cfloop>
    thats it
    PS: I think your original query needs modifying. To return
    the exact records that you want to update from the original table.
    ie: Primary and foreign key relationship

  • Problem with updating records in database

    Hello everyone,
    I have a question, i have a database and in the database I want to update some records.
    Now, in my database I have refnr, vnr, etc� it is possible that I have 3 the same refnr (example)
    98765A     001     
    98765A     002
    98765B     003
    Now, the program must compare the records between 2 databases and than update al the records flag (example) after comparing
    98765A     001     A
    98765A     002     A
    98765B     003     A
    Now my question is, in the first code 1 example I search all the records and after a IF statement the program send the refnr and the vnr object to updateRecordsFlag(String refnr, String vnr) now In the example above you see I have for example 3 records and these 3 must updated with a A
    Sow, I have made a FOR statement that gets the highest vnr and count to 1 (Teller--), how can I make a FOR statement that send each time an object to updateRecordsFlag(String refnr, String vnr). Now it�s just the highest record that updates.
    I use preparedstatement. For read, etc�
    code 1
    try {
    rowBeheerRefvolgnrs = datasender.readBeheerRefvolgnrs();
    } catch (Exception ex) {
    ex.printStackTrace();
    String refnr = "";
    String vnr = "";
    String code = "";
    int i = 0;
    while (i < rowBeheerRefvolgnrs.length) {
    refnr = rowBeheerRefvolgnrs.substring(0,27);
    vnr = rowBeheerRefvolgnrs[i].substring(27,30);
    code = rowBeheerRefvolgnrs[i].substring(14,15);
    if (code.compareTo("A") == 0) {
         int Teller = Integer.parseInt(vnr);
         updateRecordPersonA(refnr, vnr);
              for (int j = 1; Teller >= j; Teller--) {
              updateRecordsFlag(refnr, vnr);
              vnr = new Integer(Teller).toString();
    if (code.compareTo("B") == 0) {
    //updateRecordPersonB(refnr, vnr);
    i++;
    logger.debug("update end ");
    private void updateRecordsFlag(String refnr, String vnr) {
    Here i have my code to update the flag

    declare @table nvarchar(128)
    declare @idcol nvarchar(128)
    declare @sql nvarchar(max)
    --initialize those two values
    set @table = 'Table_name'
    set @idcol = 'some id to recognize the row'
    set @sql = 'select ' + @idcol +' , (0'
    select @sql = @sql + ' + isnull(datalength(' + name + '), 1)'
    from sys.columns where object_id = object_id(@table)
    set @sql = @sql + ') as rowsize from ' + @table + ' order by rowsize desc'
    PRINT @sql
    exec (@sql)
    You can try this query. Too many varchar columns of big sizes can cause the row size to be bigger than what a row can hold, but its weird that it just went off in retry.
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Problem for running Update query with Chinese

    Hi all,
    I am running a web application in Lotus Domino.
    I have a Lotus Script Agent which need to update Oracle 8i Database with Chinese Character throught ODBC but i find that all characters become some strange characters.
    I got the problem only for update query.
    I have no problem for select query for getting the chinese data.
    Also, I got no problem to run the update query with chinese characters in Sqlplus.
    I also try to run the same update query which the ODBC connection is pointing to an MS Access Database. It works too.
    So the only things i leave is the Oracle ODBC driver.
    Anythings I should do for the Oracle ODBC server?
    Thanks very much.

    Hi, I checked the registry of Oracle and
    in the NLS_LANG field, the values is AMERICAN_AMERICA.UTF8. In the server side, I set the same.
    It should be okay, as i can retrieve the chinese content in the Oracle. Just that when i try to run a query contain chinese, such as,
    "insert into TableA values ('���')". i will got some strange character inserted in the databasae.
    Could you tell me what should i do?
    Thanks a lot a lot.

  • Query Not reflected with Updated Data

    Dear Experts,
    I am facing a Problem in query data updation.    Data has been daily updating in infoprovider successfully ,But when user run query through Bex he is always shown old data.  Then I go to RSRT and generate the query and data got updated.
    Every Time for new data updation I need to Generate the query.
    What could be reason for this.  Is this related to cache data ?
    Any Advise .
    Thanks in Advance.

    Dear Michael,
    This problem is coming only for one Multiprovider.   Running this program would affect all other queries also . This will Delay the reporting.
    Any other reason why query is reflected with old data Though infoprovide is loaded with new data.

  • Software update check via iTunes with error message (1664).

    I had a recent experience with my new Ipad '4'. It is running IOS 6.0.1. When I perform a software update check via iTunes, it returned a message saying that an unknown error had occured (1664). When I connect my iPad 2, and did the same check, it returned the nomal "softawre is current version (IOS 6.0.1)" message. However when I checked the software update via Settings in my Ipad '4'. it returned the msaage "your software is up to date". I had completely rebooted (totally switched off) the Ipad '4' and it still gave me the same message via Itune. not sure what is truly going on here.

    The above is from here:
    Resolve iOS update and restore errors - Apple Support

  • I used to be able to double click the home button to choose to receive notifications via iPhone speaker instead of the Bluetooth. With ios7, that's gone as well as any obvious way to do it.  I don't wear my Bluetooth on my ear every minute of the day!!!!

    I used to be able to choose to receive notifications via iPhone speaker in ios6 by double clicking the home button.  Ios7 took that away and I cannot see how to do it at all.  I don't have my Bluetooth in my ear constantly!!!

    If you are getting Siri when you double tap, then your home button must be sticking. Siri comes up when you hold the home button. Try tapping quickly twice. When that happens, the multi-tasking list comes up and you will see the app icon and then a thumbnail, or reduced size view of the app above it. You put your finger on that thumbnail and swipe upwards with your finger.
    For that issue, you might want to do a reset of the phone. Hold the sleep/wake and home buttons together until you see the Apple logo and then release. The phone will reboot. This will not affect your data.
    To be honest, your novel is a little difficult to read, and I think you put too much information in there, and a lot of it is unnecessary. Be to the point and just add information necessary to understand the issue.

  • Global query block is causing a DNS server to fail a query with error code Name Error exists in the DNS database for WPAD

    Global query block is causing a DNS server to fail a query with error code Name Error exists in the DNS database for WPAD on a Windows 2008 server.

    The global query block list is a feature that prevents attacks on your network by blocking DNS queries for specific host names.  This feature has caused the DNS server to fail a query with error code NAME ERROR for wpad.contoso.com. even though data
    for this DNS name exisits in the DNS database.  Other queries in all locally authoritative zones for other names that begin with labels in the block list will also fail, but no event will be logged when further queries are blocked until the DNS server
    service on this computer is restarted.

  • Update query with CL_SQL_STATEMENT class

    Hi all,
    I'm trying to execute an update query with ADBC classes in order to modify two parameters (n_doc and processed) from a row with the following instructions:
          l_con_ref = cl_sql_connection=>get_connection( 'DB_7879' ).
          l_stmt_ref = l_con_ref->create_statement( ).
         CONCATENATE 'update' gv_table ' set n_doc= ? processed = ''X'' where id_ordn = ? '  INTO l_stmt SEPARATED BY space.
          GET REFERENCE OF materialdocument INTO l_dref.
          l_stmt_ref->set_param( l_dref ).
          GET REFERENCE OF ps_zmm_mov-id_ordn INTO l_dref.
          l_stmt_ref->set_param( l_dref ).
          l_stmt_ref->execute_update( l_stmt ).
    However, I got the error ORA-0933: SQL command not properly ended. I guess this error occurs because I am trying to update two parameters with a single query since using the following CONCATENATE instruction
         CONCATENATE 'update' gv_table ' set n_doc= ? where id_ordn = ? '  INTO l_stmt SEPARATED BY space.
    results ok.
    Does anybody know if it is possible to modify two parameters with only one update query with ADBC classes?
    Thank you in advance!

    Hi Suhas,
    Based on Oracle, I see it conforms almost completely ISO/IEC 9075 ([Oracle and Standard SQL|http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/ap_standard_sql.htm#10293])
    UPDATE seems to conform completely [UPDATE SET clause|http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_108a.htm#2087215]
    So using a comma to separate columns is true for every SQL language that conforms ISO/IEC 9075
    Sandra
    PS: of course SAP's "Open SQL" language does not conform at all

  • After update to iOS7 i can't buy in app with my account via VISA card

    After update to iOS7 i can't buy in app with my account via VISA card

    What sort of visa card, debit or credit ? As far as I know debit cards are no longer accepted as a valid payment method.
    And what happens when you try to buy something, does the 'buy' button not work, do you get any error messages ... ?
    If you are getting a message to contact iTunes Support then you can do so via this link and ask them for help (we are fellow users here on these forums, we won't know why the message is appearing) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    If it's a different problem ... ?

Maybe you are looking for