How to check if an application is running

I have a PL/SQL package that runs some program units (does updates and insertions), in a loop.

In the package, before I enter the loop, I want to see if this process is being run by someone else. If this is the case, I want to interrupt my treatment.

Is there a way to do this from the package?

Thank you

781424 wrote:

I have a PL/SQL package that runs some program units (does updates and insertions), in a loop.
In the package, before I enter the loop, I want to see if this process is being run by someone else. If this is the case, I want to interrupt my treatment.

Is there a way to do this from the package?

The start-up of this treatment procedure, it needs access to a kind of serialized resource and if the resource is available, keep it locked for the duration of the process. If the resource is already locked, then another copy of this process is already running.

This can be done using the DBMS_LOCK. A basic example of this operation is posted in {message identifier: = 9388540}.

Tags: Database

Similar Questions

  • How to check what Qt application is run for the first time?

    How to check what Qt application is run for the first time? I need for the creation of trial version of my application. Any help is greatly appreciated

    Probably use file data and put an I_ran_at_least_one_time file and verify its existence. This file is not accessible to the user and is not changed even if you upgrade the application.

  • How to check the MSDS 13.2 running MSD Agent (legacy mode) or TMS provisioning or extension of TMS provisioning services.

    Hello

    How to check the MSDS 13.2 running MSD Agent (legacy mode) or TMS provisioning or extension of TMS provisioning services.

    Kind regards

    Siva

    My TMS is strictly using Extension of Provisioning, because I am running 14.3.2 TMSPE is the only option for me, so I can't provide a screenshot.

    However check you by going to: administrative tools > Configuration > General settings, look for the commissioning Mode.

    That said, I suggest that you consider migrating to TMSPE if you have not already, that the recent version of TMS have removed TMS Agent legacy mode.  If you want to use the latest versions of TMS and take advantage of the features it provides, you will need to perform the migration, if not already done.

  • How to check multiple occurrences of a running program?

    Hi all, I'm running with the following:

    Laptop HP Pavilion DV9700 Ent

    8.1 to win

    Having an easy q' can't seem to remember how to check.

    On my 'to-do bar' under "show hidden icons" I show 2 occurrence of Norton Internet Security supposed to be running.

    How can I confirm how many times it is running.  It seems to be the same product.

    If I look at 'taskmgr' it shows as 2 instances of work?  Why would it be?

    Any ideas.  I know I should probably symantic asking this question, but I can't find my passwd info connect there right now.

    Thanks for your help.

    Your Norton product, click Support > get Support. To run the auto adjustment tool. Check if the tool detects problems. In addition, run LiveUpdate repeatedly to get all available updates & restart the computer. Let me know if you face any other problem with the help of Norton.

    Thank you!

    Harry

    Norton support

  • How to check that my application is in the context of the background thread

    I'm listening to push into the background thread, but I want to receive the push only when the application is in the background, and then how to check that the app is in the background

    check if it is listed in http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html...

  • How do I close the application currently running on the Tablet BlackBerry® Simulator.

    I'm new to blackberry Tablet

    I wasn't able to close the application and come to the home screen to check the new application.

    When I reboot and then I can able to see the home screen

    Can someone help me to go to the home screen when the application is running.

    Try to drag the mouse to the top of the bevel down/down (make sure that you start bevel).

    Once the application has been reduced in the center of the main screen you can drag it again to close it.

    . H

  • How to check for the application ID in a function of connection?

    Hello

    I have a connection procedure which is something like this:
    wwv_flow_custom_auth_std.login(
        P_UNAME       => :P58_USERNAME,
        P_PASSWORD    => :P58_PASSWORD,
        P_SESSION_ID  => v('APP_SESSION'),
        P_FLOW_PAGE   => :APP_ID||':15'
        );
    And the authentication procedure is this:
    create or replace
    FUNCTION  "ACL_CUSTOM_AUTH" (
        p_username IN VARCHAR2,
        p_password IN VARCHAR2
        )
    RETURN BOOLEAN IS
    BEGIN
      FOR c1 IN (SELECT 1 
                  FROM acl_employees
                 WHERE upper(userid) = upper(p_username)
                   AND mot_de_passe = p_password)
      LOOP
        RETURN TRUE;
      END LOOP;
      RETURN FALSE;
    END;
    I want to check for an application in the acl_employees table ID, because I want to check if this user is credited for THIS specific APP_ID, adding a following kind of code to the function of authentication:
    AND application_id = :app_id)
    The problem is that the connection API takes in charge only two parameters for custom authentication: user name and password. How can I switch the APP_ID to authentication?

    Thank you for your help.

    Christian

    Published by: France Christian February 23, 2010 06:23

    Published by: France Christian February 23, 2010 06:24

    It is sometimes easier to check the user before calling the connection custom Apex then past just a password to NULL to the connection works if the check fails. Something like that before the connection:

    DECLARE
    v_dummy NUMBER;
    BEGIN
    SELECT 1
    INTO v_dummy
    FROM acl_employees
    WHERE upper(userid) = upper(p_username)
    AND application_id = :app_id;
    EXCEPTION WHEN NO_DATA_FOUND THEN :P58_PASSWORD := NULL;
    END;
    
  • How I check my Mac, applications are compatible with the Sierra?

    How can I ensure that my Mac, applications are compatible with Sierra FRONT update?

    I read that some applications may not work more on macOS Sierra abandoned because of the garbage man.  Only thing I found was to use the command terminal otool - oV Applications/PROGRAMMNAME.app/Contents/MacOS/PROGRAMMNAME | tail - 3 to verify an application but I'd have to type that in hundreds of applications - is not good.

    You can see http://roaringapps.com/apps?platform=osx.

    If you want to check your applications manually, you can run this AppleScript:

    paragraphs of the allApps value (the shell script ' find/Applications / - name \"*.app\ '-maxdepth 2 |" ") SED EI \"s/\\(.*\\)\\/\\([^\\/]*\\).app/\\2/g\" ")

    Set compatibleApps to {}

    Set incompatibleApps to {}

    Repeat with PAP in allApps

    set this to the script ' otool - oV "shell & city form of (' / Applications /" PAP ".app/Contents/MacOS/" & PAP) & "|" tail - 3"

    If this contains "OBJC_IMAGE_SUPPORTS_GC" then

    Copy at the end of incompatibleApps PAP

    on the other

    Copy at the end of compatibleApps PAP

    end if

    end repeat

    -If you want a dialog box to view the compatible/incompatible applications

    compatibleString the value «»

    incompatibleString the value «»

    Repeat with theItem in compatibleApps

    "the value compatibleString compatibleString & item &"

    "

    end repeat

    Repeat with theItem in incompatibleApps

    "the value incompatibleString incompatibleString & item &"

    "

    end repeat

    Tell me to display the dialog box "compatible apps:

    "& compatibleString

    Tell me to display the dialog box "incompatible apps:

    "& incompatibleString

  • How to find whether the application is running or not?

    Hi guys,.

    I have 2 requests name such as appln1 and appln2

    First I started the appln1 manually (not launched from lettering to the other... here may be getting correct status) then

    I started the appln2 manually, it must get the current state, if appln1 is running or not?

    But it still gives appln1 AI is not running.

    It is poosible to get the current state of the appln2 to the appln1.

    If it is please let me know.

    Thanks in advance.

    Take a look at this thread.

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=1112&query.ID=984...

    Concerning

    Bika

  • Determine whether the application is running

    Hello

    I'm developing an application that will provide a background thread that calls a UIApplication.

    Is there anyway that I can determine this background thread if the UIApplication is already running?

    I tried to use Application.isAlive or isForeground, but I don't have this UIApplication instance in the background thread.

    In short, can anyone suggest how to determine whether the application is running from outside the application? (excuse the sentence wrong-box )

    Thanks in advance

    Bell

    Why do you not use DURATION for this store. Take a look at this article from BB that does something similar.

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800783/How_To _...

    Kind regards

    yosoh

  • How to check an Application/process running using Labwindows

    Hello

    How can I check if a process or Application is running or not with CVI?

    I used to try this in Labview, and to check the application, it is a VI in the Web site of NOR. But I have no idea on the use of CVI for this.

    And also, how can I check if a file is opened or help? I want to rename foder in my code, if it is open (perhaps a file in the folder are open), the action to rename will go wrong.

    Thanks in advance

    Hello

    using forum search I found the following thread discuss your topic:

    http://forums.NI.com/T5/LabWindows-CVI/how-to-know-exe-is-running-and-close-the-exe/m-p/1040673

  • How can I test to see if another application is running?

    I manage systems remotely via start PC Anywhere Some VI automatically load, but because of a loop tightened with the VI I am unable to get support for PC Anywhere. I would like to put something in the VI seeking to check if PC anywhere works and if it is to end the loop of VI. Any ideas?

    To determine if a program is already running try to use the TaskList command line program (assuming you are using Windows)

    Execute a call to exec the system with being "tasklist" command line it will return the list of all applications running from the Standard exit sign.  You can use this program to give also access to remote computers, but I have never tried.

    Fund the available switches go to start > run, then type "cmd" hit enter in the command window type "Tasklist /?" this should show you how to use it to see what applications are running on a remote computer.  I hope this helps.

  • How should I detect the application runs in the background?

    Hello friends,

    I use 2 statement to run the application in forground and background.

    UiApplication.getUiApplication () .requestBackground ();
    UiApplication.getUiApplication () .requestForeground ();

    I need to check my application is running in the background or forground? someone help me how should I detect that my application in what state?

    {if (condition)}

    System.out.prinltn ("application run in Background");

    }

    Else if (condition111) {}

    System.out.prinltn ("application in the foreground");

    }

    What is this condition? and condition111? Please help me with this...

    Thank you and best regards,

    Ajay Patil.

    Hello

    With the help of UiApplication.getUiApplication () .isForeground (); You should be able to determine if the application is in the foreground. Hope that helps.

  • How to access the health application on an iPhone 4 running iOS 9.2 s?

    How to access the health application on an iPhone 4 running iOS 9.2 s?

    The icon is missing?

  • Does anyone know of a VI or how to write one that will stop the computers time be disabled if an application is run.

    Does anyone know of a VI or how to write one that will stop the computers clock be turned off if an application is run. The time and date can be reset normally while an application is running by clicking on the time in the lower right of the screen of the computer. I have an application that runs over several days and it is essential that the time and date of the computer not be changed. Is there an easy way of this lockout the user? Note that I am what I consider a beginner advanced in LV

    Thank you

    Chuck

    This isn't something that you can from LabVIEW, because this is an operating system operation, and it will depend on the operating system you are using. Under Windows, you can use Group Policy to control this. Please Google on "prevent changing the date and time of windows."

    Also, please try to refrain from stuffing your message in its entirety in the block of material. Keep short, but descriptive enough topic so we can understand what you're asking basically. Thank you.

Maybe you are looking for

  • Mouse SideWinder 3 failure

    I have a usb sidewinder gaming mouse, left-sife canned button power off.  Is it a design/hardware problem that I reinstalled the drivers/software, nothing and I noticed this problem on other forums.  Can it be fixed or guess who will never buy again

  • as the sucede a mi facebook

    No I can access a mi cuenta facebook

  • Why LabVIEW example projects using Global Variables?

    I'm puzzled.  I've been pretty good programmers LabVIEW talks (including some who work for the OR) and came away with the impression that Global Variables should, as a general rule, be avoided, with functional Global Variables (alias VI Globals) gene

  • I had a volume icon in my taskbar that suddenly has disaapeared... . How do I get it back?

    The status bar that appears at the bottom of the page has a volume icon through which I could adjust the volume of which has been played / this icon suddenly disappeared. How to restore the volume icon?

  • Old system Windows 7 Pro has suddenly lost Activation

    A Workstation Windows 7 established for a long time suddenly announced that it is not running Genuine Windows. It's a Dell workstation and it has been activated for a period of time. The MGA diagnosis shows that the license is genuine, but the rest o