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 4121724
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:23:18+00:00 2026-05-20T23:23:18+00:00

How do I create PL/SQL function which waits for update on some row for

  • 0

How do I create PL/SQL function which waits for update on some row for specified timeout and then returns.

What I want to accomplish is – I have long running process which will update it’s status to ASYNC_PROCESS table by process_id. I need function which returns with true/false when this process has completed, but also I need this function to wait some time for this process complete, return on timeout or return imediately with true, when process has completed. I don’t want to use sleep(1 sec), because in such case I will be having 1 sec lag. I don’t want to use sleep(1 msec), because in such case I am spending cpu resources (and 1msec lag).

Is there a good way how experienced programmer would accomplish this?

That function will be called from .NET (So I need minimal lag between DB operation and .NET/UI)

THNX,
Beef

  • 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-20T23:23:19+00:00Added an answer on May 20, 2026 at 11:23 pm

    I think the most sensible thing to do in this case is to use update triggers on that ASYNC_PROCESS table.

    You should also look into the DBMS_ALERT package. Here’s an edited excerpt from that doc:

    Create an alert:

    DBMS_ALERT.REGISTER('emp_table_alert');
    

    Create a trigger on your table to fire the alert:

    CREATE TRIGGER emptrig AFTER INSERT ON emp
    BEGIN 
       DBMS_ALERT.SIGNAL('emp_table_alert', 'message_text'); 
    END;
    

    From your .net code, you can the use something that calls this:

    DBMS_ALERT.WAITONE('emp_table_alert', :message, :status, :timeout); 
    

    Make sure you read the docs for what :status and :timeout do.

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

Sidebar

Related Questions

I have an SQL function which returns a list of Teams. I want to
Is it possible to create a SQL Server function which returns a nullable string?
Question: I have an SQL function which returns a list of files now I
Is the following possible in SQL Server 2000? CREATE FUNCTION getItemType (@code varchar(18)) RETURNS
I have a sql function which looks up the parent of a certain node
When you create a procedure (or a function) in Oracle PL/SQL, you cannot specify
I have created a function that takes a SQL command and produces output that
I want to create a SQL Server Express database on my local machine and
I need to create an SQL query to insert some data into a table
I want to create a SQL Select to do a unit test in MS

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.