Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 318263
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:33:12+00:00 2026-05-12T08:33:12+00:00

In our project we want to use Cache Dependency.After some searching,i’ve learned that it

  • 0

In our project we want to use Cache Dependency.After some searching,i’ve learned that it is just for Sql Server and we should write our own cachedepency class for it.Has anyone tried it before?What is the easiest way to set dependency to an Oracle table?We use Oracle 11g and .net 2008,Thanks for Help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:33:13+00:00Added an answer on May 12, 2026 at 8:33 am

    Oracle allows you to implement a notification scheme using the dbms_alert package. If you google dbms_alert, you’ll find many pages giving you examples of how to use it, but basically it involves 3 things:

    1. You call dbms_alert.raise (with a label of your choosing) when you want clients to be notified of a change (for exammple, in the insert/update/delete triggers for a table which you need Cache Dependency).

    2. The client will hold onto a connection where they have called the dbms_alert.register function (with the particular label being registered).

    3. At any time, the client can call dbms_alert.wait or .waitany; the function will block (or you can supply a timeout) until the alert has been raised. In your case, you could call waitany with a short timeout immediately before you need to display the data you were monitoring.

    The wait functions work well – you don’t need to constantly poll, unless you need to know the second something has changed. Instead, you can just check them when you’re about to use your cached data to make sure its up to date. Also, the clients aren’t notified until the transaction that raised them commits.

    The biggest limitation with dbms_alert is that only one transaction can raise an uncommitted alert of a particular label at one time. In other words, if transaction A raises alert “foo”, transaction B will block when it raises “foo” until A rolls back or commits, so it’s generally not a good idea to use alerts in transactions that could take a long time (unless blocking other users is part of the design). Also, as mentioned above, the client needs to hold onto a connection that will be used to check for notifications. This can be the same connection you’re using to perform any other database activity, but if you’re writing an application that does a lot of connection pooling/sharing, you’ll need to have a facility for holding onto the connections for the length of time you need to keep the cache coherent.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.