Dbms_Scheduler and executable script

Hello

I have a scenario. I was running a shell script (which in turn runs an oracle procedure) every 30 minutes and put it in cron. Now, that was before, when the procedure used to take less than 30 minutes.

Now, one day, intermittently, it takes MORE than 30 minutes. Thus, the second round of the procedure not obey the limits set for the program.

I want to have is to have a SINGLE instance of the shell script (it emails after the procedure), running at a given time. So if the cron lights and he sees that there is already one instance of the script running, and this should not run now.

The way I wanted to do it is like this:

(i). dbms_scheduler to run the executable file and somehow (I need help here) stopping at the next run to the don't fire unless there is a already running.

or

(II) use dbms_scheduler to run the actual procedure and somehow allowing that ONE perform the procedure at some point (in this scenario, I must take care of the Oracle email itself rather than from unix).

or

(III) there is an alternative where I was using autonomous transaction to update a table that runs the program and then NOT run the same procedure when it is already running. But, since it is an in-house solution and Oracle might have something to do this already, I would use the Oracle one.

Thank you.

Hello

In fact i) is done for you automatically. If you schedule a task to run periodically and the last execution runs during the next start date, then dbms_scheduler automatically skip the next run and move on to the next. dbms_scheduler has never two instances of the same task running at the same time.

If you do not need no additional concurrency control. If you do not need concurrency control, dbms_lock provides a simple way to protect access to a resource (e.g. If only a session must Access a table at the same time).

Finally if you just need e-mail sent when a job fails, you can use a utility provided by Oracle on the Planner home page

http://www.Oracle.com/technology/products/database/Scheduler/index.html

Locate the notification of work under Scheduler utilities package that will make it very easy to send e-mail when your job will fail.

If you have any other questions, feel free to ask!

-Nice

Tags: Database

Similar Questions

  • With photoshop 2014 cc 2.0 in edit, fill, pattern, script, I get only 6 options. Trees and executives have disappeared.

    With photoshop 2014 cc 2.0 in edit, fill, pattern, script, I get only 6 options. Trees and executives have disappeared and I only get the filling of symmetry, filling of brick, cross weave, place along the path, random fill and spiral. This is normal or is my corrupted photoshop version?

    options are passed to the FILTER - RENDERED

  • Rotation of the screen with Automator and a script

    I have no knowledge whatsoever about scripts, coding or automator. I continue to read discussions about the issue, but I don't understand them. It would be a great help for me if someone please explain how to create a kind of keyboard shortcut that changed the rotation of the screen (the own macbook screen, not an external) using automator and a script on a Macbook Air running OS X El Capitan 10.11.2.

    Is this possible?

    Thank you in advance.

    One option is to use the utility command line fb - turn in Automator service and assign a keyboard shortcut. Download the GitHub source fb-rotation, compilation, following the indications on GitHub and output the binary to usr; or download a binary compiled and move to usr/local/bin.

    Create an Automator service, set the options "Service receives no entry in any application", add an action to run the Shell Script and set the options as "Shell: / bin/bash ', ' Pass entry: to stdin.  Type the command rotation fb for the desired degree of orientation of the screen such as ' / usr/local/bin/fb-rotation - d 0 - r 180 ' 180 ° on the main screen. Register the service under a name.

    Go to  > System Preferences > keyboard > shortcuts > Services. Highlight the service you created, select it, click "none" and create a shortcut using a unique combination of keys. Create separate services of Automator for the additional screen orientations. Quit the system preferences when you are finished.

    Tested with OS X 10.10.5 Yosemite and El Capitan 10.11.3

  • Where can I download the latest version which allows images and java script off?

    Because of my connection is often slow, I have the option to turn off "automatically download images" and Java script. 23 Firefox doesn't have these options. Where can I download version 22 or whatever the latest version is that these permitted options?

    Thank you

    There is also settingsanity

  • AppleScript and shell scripts

    I'm on Mac OS X 10.11.2 and have problems with AppleScript and shell scripting.

    The following script is a cutting of a larger project:

    Tell application "Finder".

    the value the_MePath (path for me)

    the value the_MeCont (the_MePath container) as string

    tell the end

    the value of the_MeCont (text 1 thru-2) the_MeContShell

    -normally isn't here!

    the value the_MePara (the_MeCont & "STH - C Para WAV_48k_24.txt")

    the value the_Parameters (opening for access file the_MePara with permission to write)

    write ("WAV\r24\r48000\r48k\r") the_Parameters

    Close access the_Parameters

    -normally isn't here!

    -destined to be there!

    -the value the_MePara (shell script 'find' & city form the_MeContShell POSIX path & "-iname" "Para STH - C *'")

    the value the_Parameters (opening for access file the_MePara)

    the value the_ParaList (read the the_MePara file)

    Close access the_Parameters

    paragraph 1 of the value userFormat the_ParaList

    paragraph 2 of the the_ParaList the value userBitDepth

    paragraph 3 of the the_ParaList the value userSampleRate

    paragraph 4 of the the_ParaList the value shortSampleRate

    The lines between the "-normally isn't there!"-lines fills a file in the directory of the AppleScript with the data.

    So now the file is there.

    If I remove these lines and enable the line below "-intended to be here! ', the shell should find this file.

    What I get, then, is a mistake:

    "Fehler beim Zugriff auf das Netzwerk." error number - 5000 file "/ users/shared/_AppleScript development/_Archiv Sniplets/STH-C Para WAV_48k_24.txt" to "class fsrf".

    to "open for access file the_MePara.

    Any ideas, anyone?

    Kind regards...

    ... Maik

    Hello

    Remove the end of file before the_MePara.

    the_MePara contains a posix path type path--> "/ users/shared/_AppleScript development/_Archiv Sniplets/STH-C Para WAV_48k_24.txt.

    You can use the file on the path of type HFS --> ' StartupDiskName:Users: shared: _AppleScript development: _Archiv Sniplets:STH - C Para WAV_48k_24.txt.

    Information:

    The script didn't need to open and close the access when the script to read-only.

    Use this line only--> the value the_ParaList to read the_MePara

  • is it possible to load and execute space cadets in windows 7 on a Windows XP disk. then running in a mode of compatibility for Windows XP or 95

    original title: Space cadet 3D pinball

    Pinball Space cadet is not not available for windows 7. is it possible to load and execute space cadets in windows 7 on a Windows XP disk. then running in a mode of compatibility for Windows XP or 95. I have a relevant disc that I purchased when using XP (and seriouly consider replace Windowsd 7 with). If it is possible, are there problems to download it.

    Try this: http://mspinball.weebly.com/download.html. He was installing a short test, and it works (download and installation may alert you to "Unknown Publisher", but various analyses did not find anything harmful). "192GO should be enough for everyone." (of the miniseries "Next generation jokes")

  • Use the standard action and action scripts conditional on the same blade upon entry

    I want two different types of action to run on blade scripts enter the same blade, one second apart.

    1 script: fill a variable with the current date.  It is a standard action going right.

    2nd script (run 1 sec after the first script): If the above variable is greater than the current date, follow these steps.  It is a conditional action.

    How can I get Captivate perform these two actions in the same blade?  I can do if 1 script is located on the previous slide and the script 2nd on the second slide.  However this does not look good.  I want these two scripts to run on enter the same blade.  I use CP8.  Any suggestions would be greatly appreciated.

    Thank you

    Sharon

    You can use the two decisions, the first decision designating a standard simulated action by using a condition that always leads to True:

    First decision "always."

    IF 1 is equal to 1

    Assign the v_one with...                         the commands of your standard action

    Second decision «...» »

    IF v_one is equal to cpInfoCurrentDateString your conditional action

    However, in CP8 it is NOT possible to delay of 1 orders dry, this is only possible in CP9. Why you want to defer checking?

  • V.11 ColdFusion Standard can be installed and executed on a Windows virtual server, or must it be installed on a physical server?

    V.11 ColdFusion Standard can be installed and executed on a Windows virtual server, or must it be installed on a physical server?

    It can be installed on physical servers and virtual machines. He political license would be different for the physical server and a virtual machine.

  • Executed scripts takes too long

    Hello

    I hope for more help with improvement / reducing the amount of time required to get a script to run. I have provided the following script to our CMDB group but they say it take too long to run (full day).

    I already use the get-view option to extract the details. Maybe someone can advise how they would improve this script. For the record, we have 2000 + vm in our environment.

    Script is attached.

    Any help is very appreciated.

    Hello, VM_.

    Well, nobody likes a slow script, that's for sure.  And a script of the day?  Double boo to that.

    I had a quick glance, and there were some spots of improvement.  I have them made here:

    Add-PSSnapin VMware.VimAutomation.Core
    
    function Get-VMSerial {  ## rewrote to take UUID; already being gotten in properties below  # param([VMware.VimAutomation.ViCore.Impl.V1.Inventory.VirtualMachineImpl]$VirtualMachine)  # $s = ($VirtualMachine.ExtensionData.Config.Uuid).Replace("-", "")  param([string]$Uuid)  $s = $Uuid.Replace("-", "")  $Uuid = "VMware-"  for ($i = 0; $i -lt $s.Length; $i += 2)  {    $Uuid += ("{0:x2}" -f [byte]("0x" + $s.Substring($i, 2)))    if ($Uuid.Length -eq 30) { $Uuid += "-" } else { $Uuid += " " }  }
    
      return $Uuid.TrimEnd()}
    
    # Connect to vcenterConnect-VIServer vcenter
    
    #Gathering VM settingsWrite-Verbose -Verbose "Gathering VM statistics"$VMReport = @()$Count = 0
    
    ## no need to use Get-VM#Get-VM | % {## moved outside of the Foreach-Object scriptblock, so this Get-View only gets called once, not 2000+ times (not once per VM, just once at all)$filter = @{"Config.Template"="false"}Get-View -ViewType VirtualMachine -Filter $filter -Property Name,Guest.HostName,summary.config.numcpu,summary.config.memorysizemb,summary.config.numEthernetCards,Summary.Config.NumVirtualDisks,Config.Uuid,Parent,Guest.GuestFamily,config.tools.toolsversion,guest.toolsstatus,config.Version,Config.ChangeTrackingEnabled,Datastore,AvailableField,Value | %{    ## $vm is the View of the current VM    $vm = $_    ## not used -- removed it    # $CustomDetails = Get-VM $_ | Select -ExpandProperty customfields    ## rewrote to use Get-View or UpdateViewData()    # $LunTierStringArray = Get-VM $_ | Get-Datastore    $LunTierStringArray = Get-View -Property Name -Id $vm.Datastore    $LunTierString = $LunTierStringArray.Name -split "_"    $vms = "" | Select-Object VMName, Cluster, DnsName, TotalCPU, TotalMemory, TotalNics, Disks, DiskTier, SDF, UUID, Folder, OS, ToolsVersion, ToolsStatus, HardwareVersion, CBT, Serial    $vms.VMName = $vm.Name    ## rewrote to use UpdateViewData()    # $vms.Cluster = $(Get-vm $_ | Get-cluster).Name    $vms.Cluster = &{$vm.UpdateViewData("Runtime.Host.Parent.Name"); $vm.Runtime.LinkedView.Host.LinkedView.Parent.Name}    $vms.DnsName = $vm.Guest.HostName    $vms.TotalCPU = $vm.summary.config.numcpu    $vms.TotalMemory = $vm.summary.config.memorysizemb    $vms.TotalNics = $vm.summary.config.numEthernetCards    $vms.Disks = $vm.Summary.Config.NumVirtualDisks    $vms.DiskTier = $LunTierString[0]    ## getting this in some other way, from the    # $vms.SDF = ($_ | Get-Annotation -CustomAttribute 'School/Division/Faculty').Value    $vms.SDF = & {$intCustomAttributeKey = ($vm.AvailableField | ?{$_.Name -eq "School/Division/Faculty"}).Key; ($vm.Value | ?{$_.Key -eq $intCustomAttributeKey}).Value}    $vms.UUID = $vm.Config.Uuid    ## add -Property Name, though, with " | Out-Null", does this even work?    # $current = Get-View $vm.Parent | Out-Null    $current = Get-View $vm.Parent -Property Name,Parent -ErrorAction:SilentlyContinue    $path = $vm.Name    do {         $parent = $current         if($parent.Name -ne "vm"){$path =  $parent.Name + "\" + $path}         ## add -Property Name, though, with " | Out-Null", does this even work?         $current = if ($null -ne $current.Parent) {Get-View $current.Parent -Property Name,Parent -ErrorAction:SilentlyContinue}    } while ($current.Parent -ne $null)    $vms.Folder = $path    $vms.OS = $vm.Guest.GuestFamily    $vms.ToolsVersion = $vm.config.tools.toolsversion    $vms.ToolsStatus = $vm.guest.toolsstatus    $vms.HardwareVersion = $vm.config.Version    $vms.CBT = $vm.Config.ChangeTrackingEnabled    $vms.Serial = Get-VMSerial -Uuid $vm.Config.Uuid    $VMReport += $vms    $Count++    ## added Write-Verbose so that the pipeline does not get polluted with strings (for the day that this code is returning objects for further manipulation down the pipeline, instead of going straight to CSV)  Write-Verbose -Verbose $Count}#Output$VMReport | Export-Csv vcenter_vm_report.csv_tmp -NoTypeInformation -UseCultureCopy-Item vcenter_vm_report.csv_tmp vcenter_vm_report.csv
    

    I commented on the changes I made (and why) and commented on by the code I replaced.  Give a run and see if it is not faster for you / your CMDB crew.

    Message has been edited by Matt Boren on February 24, 2015: correction of the piece that gets the path of the inventory of the VM (were able only to return a parent level previously) minor

  • Depending on your mode, I loaded down and insatalled and executed. But he doesn't not started and signed "check internet connection and time setting". Internet and the setting of the time are correct.

    Depending on your mode, I loaded down and insatalled and executed. But he doesn't not started and signed "check internet connection and time setting". Internet and the setting of the time are correct.

    Please let me know how to start.

    Please try to follow: https://helpx.adobe.com/x-productkb/policy-pricing/activation-network-issues.html

  • I have an iPhone 5 c How can I get adobe flash player and java script

    I have an iPhone can get adobe flash player and java script for this or some kind of alternative to this

    tthank you

    Hi jimo92529540,

    Flash Player is not supported on any mobile device (Android, Blackberry, iOS, Windows Phone).  There may be alternatives available but not supported by Adobe.

    --

    Maria

  • If the State shows red and javascript script does not

    I am just learning Javascript and I can't believe, I have problems with that simple statement, but alas I am.

    Any help would be appreciated.

    The script is a script of learning:

    JavaScript document

    var crust = prompt ("what kind of crust do you want - thin or regular?'");

    If (== crust "thin"). (crust is 'regular')) {

    var cheese is prompt ("choose your cheese?");.

    {Switch (Cheese)}

    case "mozarella":

    case 'feta ':

    "parmesan" case

    case "cheddar":

    break;

    by default:

    Alert ("sorry we not that kind of cheese.");

    break;

    }

    } else {}

    Alert ("sorry we don't serve that kind of crust here.'");

    }

    Line no 4 and 19 shows red and the script does not run.  Help, please.  I created a similar script with numbers and it works fine but as soon as I put channels in I get errors.

    I tried to rewrite these lines so many times in so many different ways.

    I use Dreamweaver CC 2015, I Am studying an old version of Javascript?

    Any help would be appreciated.

    Thank you

    Try to run your code through this online validation tool.

    JavaScript - http://www.jslint.com/



    Nancy O.

  • I bought Acrobat Pro DC after a trial and when I go to the to use it says that I need to buy it.  I downloaded and executed.  What I am doing wrong?

    I bought Acrobat Pro DC after a trial and when I go to the to use it says that I need to buy it.  I downloaded and executed.  What I am doing wrong?

    Hey nicolettemunozconsulting,

    Please post on the Adobe forums.

    Once you have downloaded Acrobat Pro DC, begin the 'demo' and provide the Adobe ID (if it is a subscription) or the (if allowed) serial key to activate the software through the Activation dialog box that appears.

    Please see the below link mentioned the same thing:

    Installation and activation of a product to try to buy &

    Let me know if this helps.

    We hope to get your reply.

    Kind regards

    Ana Maria

  • Using CS4 Flach and action script 2.0 how to move a specific frame in the main timeline when a movie clip instance come at the end of his chronology?

    Using CS4 Flach and action script 2.0 how to move a specific frame in the main timeline when a movie clip instance come at the end of his chronology?

    code on the last frame of your movieclip instance:

    _root.gotoAndStop ('whatever_frame');  will work unless this swf is loaded into another swf.  in this case, you must use a relative path to the main timeline (for example, _parent or _parent._parent etc.).

  • View only, and Java Script

    Hi guys,.

    I would try to explain my problem.

    I have two Select lists P58_TYPE_DOC (it displays for users with no SMA profile) and P58_TYPE_DOC_ADM (it shows just for the administrator).

    On my Page of propriety I header HTML copy the following code:

    OnLoad = "show_fk_facture ('P58_TYPE_DOC'); show_fk_facture ('P58_TYPE_DOC_ADM'); »

    I need to run java script when the page is loaded, but I can't run the function for both items at the same time.

    Because one of the items will be hidden, and java script won't be able to find it.

    I tried to use if "isNAN ('P58_TYPE_DOC') else... "but it does not work.

    You have any suggestions?

    Thank you
    Eric

    Eric Sacramento wrote:

    I created a SELECT according to the user's profile! Now it is worlking :D

    This doesn't seem to have anything to do with the original question, buit if you are certain that the problem be solved brand then please this thread as a response.

Maybe you are looking for

  • Qosmio X 500 turns off everything at stake

    Hello world I need help with my Qosmio x 500, who decided to turn off when I'm in the game, now, I did some research on the Forum and found people with a similar problemso I decided to update my graphics card drivers and I thought he had fixed the is

  • Compare V191 to v195

    I conducted a phone clamshell V191 only during the last four years - not exactly, sharp but perfectly servicable as a phone and can be used in most foreign countries with a local SIM chip. (And for travel abroad, the fact that the device is so outdat

  • Computer laptop 15-ac152sa: replacing the hard drive

    I need the service for HP laptop 15-ac152sa guide to replace the hard drive, but I can't seem to find it anywhere. Can someone point me to it?

  • HP 2000 laptop: HP 2000 Notebook PC Drivers

    I did a format for my PC but I lost all the drivers, I can't connect to Internet also I can not connect via Ethernet cablePCI DRIVERETHERNET CONTROLLER DRIVERNETWORK CONTROLLER DRIVERBCM20702AO DRIVER The device information:Manufacturer: Hewlett-Pack

  • Error 0x80072efe when you try to update microsoft security essentials antivirus and antispyware definitions

    Windows XP Home Edition Version 5.1 (Build 2600.xpsp_sp3_gdr.100427 - 1636:Service Pack 3) I tried to restart the automatic updates without result. I also get frequent redirects. I have run a complete scan with MSE, and it has not detected any viruse