1 Reply Latest reply on May 4, 2011 12:14 PM by user477000

    Checking if Script is Already Running

      Hello All:

      I am writing a batch file that will fire off an Oracle Stored Procedure using something along these lines:
      IF "%%~nxV" EQU "FILE1" sqlplus username/password@prod @c:\folder\sql\sqlfile.sql

      If there some way to know if SQLFILE.SQL is already running so we don't call the process twice? Preferabbly from a batch file / command prompt.

        • 1. Re: Checking if Script is Already Running
          You might set specific action or client info in dbms_application_info and then eventually look for it.
          The other option is using global context or a table.

          BTW, I'd move it to procedure itself (to let it being processed just once) or consider using queues/scheduler_jobs.

          You have not mentioned which DB version you're using.