Use strings, or block calls PL/SQL.

I currently have a half dozen cron tasks as the kickoff of the different lots of treatment. Originally, they were usually a sequence of C programs that did different operations (extract info student to student record and insert into the system of the IdM directory of process changes, etc.). Over the years, most of the logic of the program has been rewritten as a PL/SQL packages and cron jobs basically drop into SQL * MORE and do things like:

prompt 'Do Spbpers delta'
Run simon.employee_maint. Spbpers_Delta;
commit;
asked to "Make People.Update_From_Employees"
run simon. People_Maint.Update_From_Employees;
commit;
asked to "Make SGBSTDN_Full"
execute Simon.Bstudent_Maint.Sgbstdn_Full;
commit;
Invites 'Do SPRIDEN_Full (student)'
execute Simon.Bstudent_Maint.Spriden_Full;

These procedures generally connect to other databases Oracle and get or push data autour and hit a number of different databases. The largest of these scripts a 45 execute instructions in it. (This script started in 1992...)

Anyway, we get some problems with and it's time to clean things up. It's my first foray in the Planner and I'm hoping to get some philosophical advice on how best I should restructure things. Something obvious, is to break the big script in a couple of children. In some cases, issues, enforcement and in others it isn't - although I prefer not having several jobs hitting the system admin at the same time.

I have played around with the Scheduler, mainly via the web interface of EM and resulted in a few questions - some quite specific, others more stylistic.

(1) procedures as job-, he seemed to want to stand alone procedures and NOT the procedures that were part of a package. True?

(2) how much grain should I do the steps of a string? For example, I call upon everyone to 5 proceedings in the same package (student_maint), to specific aspects of the treatment (each representing a different source table). Can I create 5 programs and make them the 5 steps of the chain, or just have 5 calls in a PL/SQL block in a program?

(3) I do not what order these 5 run, but I don't want more than one race at once--reflections on the approaches to this?

(4) I'll occasionally want to turn off these job packages (like when the remote system is going to be down for an upgrade) - the best way to things of structure to make this easy to do (and how can I do this?)

The Scheduler system seems to be a very rich and flexible environment with many more options and features that I need, but I think I should make scheduling more than one program with 45 in procedure calls...

Hello

I can try to answer some of these questions

(1) procedures as job-, he seemed to want to stand alone procedures and NOT the procedures that were part of a package. True?

Set to false. The interface of the EM has this restriction, but if you are using dbms_scheduler directly there is no such restrisction. Even in the EM interface you can work around this by using a PL/SQL block that calls the procedure of package (although the argument handling is a bit less flexible that way).

(2) how much grain should I do the steps of a string? For example, I call upon everyone to 5 proceedings in the same package (student_maint), to specific aspects of the treatment (each representing a different source table). Can I create 5 programs and make them the 5 steps of the chain, or just have 5 calls in a PL/SQL block in a program?

The answer to that depends on what you are doing. If the 5 steps to run in series one after the other, using a pl/sql block may be easier. If you want a few pieces to run in parallel, creating a simple string is better. A little more effort spent setting up the chain will result in much faster execution times if you can run the pieces in parallel.

(3) I do not what order these 5 run, but I don't want more than one race at once--reflections on the approaches to this?

It came on the forum many times and there are basically two different approaches. One is to use dbms_lock to ensure that only executes at a time. It's the easiest way and the way that I recommend.

The other way is to set up a job class with a group of consumers of resources and to implement a plan of resource consumption that specifies that only one session of this group of consumers of resources can run at a time. It is easily expandable case you want 2 or more running both of a certain category of jobs (including dbms_lock does not support).

Code on how to set this up and more discussion can be found here
Run jobs one after the other

(4) I'll occasionally want to turn off these job packages (like when the remote system is going to be down for an upgrade) - the best way to things of structure to make this easy to do (and how can I do this?)

Jobs and programs can be disabled. But if a job or the chain tries to run a disabled program will result in failure (even if she will be retried if you say that the job can be restarted).

[5]) the system scheduler seems to be a very rich and flexible environment with many more options and features that I need, but I think I should make scheduling more than one program with 45 in procedure calls...

The Planner is intended to accommodate a wide range of simple unique background of complex sequences of dependent tasks task usage. As with any software development you must use it in the easiest way possible, which is what it takes to do.

I hope this helps. Feel free to post other questions.
-Nice

Tags: Database

Similar Questions

  • Call a procedure that returns a refcursor, use it in an another proc sql?

    I have a procedure that returns a refcursor; How can I include this refcursor in a sql statement that is inside another procedure, or view etc.?

    This is the kind of foolery, I tried so far (myproc1 returns a ref cursor):

    create or replace procedure myproc2
    (
    slider ref RC
    )
    AS
    RC1 of ref cursor;
    Start
    EXECUTE myproc1 (rc1).
    Open rc for
    Select rc1.* in the rc1;
    end myproc2;

    If you want to use the result set in an SQL Ref Cursor won't be of any help. Can be read all nested Table Type. You can declare an object type and store your result in them and use them in SQL.

    Thank you
    Knani.

  • VCS CPL block call between subareas

    Hello

    I'm looking for, it is possible to create a script to block calls between the sub-areas, I mean, I don't want to, for example, that sales of subarea may call for subzone Marketing.

    I do not have different Alias prefix, the prefix aliases are the same in the two Subzones, is possible to block call due to the IP address or the name of the subfield?

    In the CPL extensions xsd file and the XSD of CPL file I have found no topic block by IP address or between subzones.

    I could find the following example script:

    *****************************************************************************************+

    "xmlns:TAA ="http://www.tandberg.net/cpl-extensions"

    "" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance"

    xsi: schemaLocation = "urn: ietf:params:xml:ns:cpl cpl.xsd" >

    *******************************************************************************************

    But only to block calls between DefaultZone and DefaultSubZone.

    Thakns in advance.

    Best regards.

    Hello

    at the time where the CPL is treated, the location of the destination device is not yet known, and we cannot therefore CPL decisions based on the zone of destination or of the subzone.

    To work around this problem, you can for example use a prefix/syntax unique to each subarea, so that you can identify implicit destination/subzone area according to this prefix/syntax.

    It would be also possible to 'outsource' this decision-making process with the use of political Service, which is a service area that can be highly customized. The external policy server could for example have a SQL database containing information on all your devices and their associated area/sub-area and base its decisions on the information which includes the VCS on the pseudonyms of source and destination for a given call, as well as a variety of other measures.

    http://www.Cisco.com/en/us/docs/Telepresence/infrastructure/VCs/config_guide/Cisco_VCS_External_Policy_Deployment_Guide_X7.PDF would be a great starting point if you want to deepen the policy Service.

    Hope this helps,

    Andreas

  • LabVIEW 8.5 problems using strings with MATLAB Script node

    I am having some problems that seem to be a bug that I can not understand how to solve using strings in the MATLAB script node.

    I have two subVIs that make some calculations and both include a variable called "errortext" is a string. The two subVIs do their calculations using the MATLAB script node, so all the outputs are defined in the script node.

    The first sub - VI outputs that string and a number. The string is sent to an indicator on the front panel. The number is sent to the second Subvi which performs some calculations more and then returns another string of the same name to an indicator on the front panel. This second string is different from the first (error different two messages should appear).

    I did have problems with this in the past until this morning. This morning, it seems that two of these channels are now somehow mystically connected to each other. The second string repeat that what the first channel said despite the fact that the first string is not be linked to the Subvi where lives the second string. The only link between the two is a calculated value of double which went from #1 to the Subvi #2 Subvi.

    I tried many things: I tried to rename the strings so that they do not have the same name. Initially, he would not let me and gave me an error saying that the renowned string was a undefined variable (which is ridiculous). After removing and replacing things, I finally managed to do so I would change the name, but now it displays nothing at all and even more I think it might still display a completely different another string in my code!

    I also tried to remove the channel indicator and replace it. Yet once, it wouldn't let me initially. I would like to highlight, press DELETE and nothing. Finally after replacing all the subVIs with them, I was able to remove the flags, but this did not help the problem.

    Any idea for these problems pecular is greatly appreciated!

    I totally understand what you did, you were talking about variables in your fist post, and it was not clear if you were referring to a variable you have defined in the Matlab code, or you try to call a variable indicator/control, where is often seen on this forum (and who isn't). That said, the crux of The Matlab Script communicates with Matlab via ActiveX, and when you use a command window opens small. This is the workspace of Matlab environment. A variable that you define in a Matlab Script node will be visible in the other, even if it's in another VI (see attached for an example, figure). This is because the script nodes are running in the same environment space. It seems to me that if this is what is happening.

  • Smartphones blackBerry how to block calls or I cant.

    need to know how to block calls

    Hi theunderdogg1965

    Welcome to the community

    If you want to block some calls on your device, you can install any App.Go to App World of call blocking, and there are several version free call blocking app available. It allows to block these calls.

    Prince

    Click 'Like' If you want to thank someone.

    If problem resolves mark message (s) as a 'Solution', so that others can use.

  • VCS - CPL to block call routing to and from the same area of neighbor

    Hi all

    Is there a CPL rule that can be written to block calls from a neighbouring area to the same area of neighbor?

    We have problems with CUCM sent appeals to the our VCS VCS then routes the call return CUCM, causing thus "too many jumps."

    In the example

    MOVI user control VCS try to compose endpoint registered RTC CUCM, but incorrectly dials

    Appeal does not have to search for the terms of local area

    Call does not match search for VCS Expressway rules

    Call corresponds to captures all of CUCM (. *) @domain.com

    CUCM does not form DN or URI for the wrong phone number and the call is routed to the VCS control due to the SIP routing model of *. * on CUCM

    We have to capture all CUCM at the end, since we offer PSTN, as well as our users and phones have the alphanumeric URIs assigned to the DNs for Jabber, etc.

    I fear that he is not really an easy way to do it, I know because the call charged CPL first, CPL don't know what area it was intended for.

    It's probably more easily accomomplished with a slight modification to your rules of research rather than spraying anthing "@domaine" everywhere - something like:

    Anything incoming directly at @domaine in the nearby area of the local area (as is inside your organization, such as if the CUCM not found and sent it to the VCS he won't be on the CUCM, so must be local (or nonexistent) - and stop.

    And the opposite of the above - route whatever it is for @domaine of the localZone.GetDaylightChanges (because it was not found locally) to stop and the CUCM neighbour-

    And do similar for what is coming from other areas outside to route to wheverver that will be endpoints.  In this way, your call should not be bouncing back between the CUCM and VCS and create the loop that you are currently experiencing.

    Of course, if your environmetn is a little more complex than the simple CUCM and VCSes, this can be a bit oversimiplified, but could lead you in the right direction.

    Another thing to consider too - if you put in your endpoints in a directory, users can use - that will help you to prevent wrong type stuff :)

    Wayne
    --
    Remember the frequency responses and mark your question as answered as appropriate.

  • error: "cannot find symbol" when you use String.getBytes (java.nio.charset.Charset)

    I have a very simple java class that uses String.getBytes (java.nio.charset.Charset). When I use loadjava, I get the error: "cannot find symbol" for this call. Any ideas on what could be the problem?

    Here is the full source:

    package mytest;

    java.lang.String import;
    java.nio.charset import. *;

    public class MyTest {
    public final static Charset utf8charset = Charset.forName("UTF-8");

    public int printString (String s)
    {
    Byte [] utf8 = s.getBytes (utf8charset);
    System.out.println (utf8);
    }

    public void printString)
    {
    printString ("hello");
    }

    };

    Thanks in advance,

    Keith

    Your code is correct for java 1.6 and higher...

    First of all, you should check that java version is on your database...

    FUNCTION to CREATE or REPLACE getJavaProperty (myprop IN VARCHAR2)

    RETURN VARCHAR2 IS THE JAVA LANGUAGE

    name "java.lang.String return java.lang.System.getProperty (java.lang.String);

    SELECT getJavaProperty ('java.version') of double;

    in my case, I have java 1.5...

    If you look at the Javadoc String (Java Platform SE 7) you will notice that your version is located for java greater or equal to version 1.6

    Try with:

    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED INSURANCE2."Test1" as
    public class MyTest
    {
    public static int printString(String s)
    {
            try
            {
            byte[] utf8 = s.getBytes("UTF-8");
            System.out.println (new String(utf8));
            }
            catch(Exception ex)
            {
              return -1;
            }
            return 1;
    }
    
    };
    
  • call PL/SQL procedure from javascript

    Hello!

    How can I call PL/SQL procedure from JavaScript code?


    Thank you!

    Nihad

    Nihad,

    What APEX version do you use? Dynamic actions in 4.0 make is much easier than it was in previous versions of APEX...

    Kind regards
    Dan

  • Return more than an OUT parameter of the stored procedure called in sql

    I searched for it, but maybe that I did a good job. I would return two parameters of a stored procedure that is called from an sql query. Something like
    select my_proc(in_param) from dual
    When the results of the query will return 2 columns. It is guaranteed in my design in order to return only a single record.

    Is this possible?

    The version of Oracle that I use is:
    Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bi
    PL/SQL Release 10.2.0.2.0 - Production
    "CORE     10.2.0.2.0     Production"
    TNS for Linux: Version 10.2.0.2.0 - Production
    NLSRTL Version 10.2.0.2.0 - Production

    Is this possible?

    Laughing out loud
    You can not call a stored SQL procedure. Only functions can be called from SQL.

  • How to compare the type of data returned block Varchar2 PL/SQL

    Hello

    I'm new to the PL/SQL PROGRAMMIN, only to learn the basics of using if else block.
    Here I have a query, please help

    We compare a varchar2 data type using cant =. (For example, if the return value is equal to the name then alors that otherwise do something else)

    declare

    V_Key VARCHAR2 (15);
    V_Value VARCHAR2 (15);
    BEGIN

    SELECT try.key FROM V_Key TO TRY WHERE value = "Value1";

    IF(V_Value='Key1') THEN
    dbms_output.put_line (' value is ');

    on the other
    dbms_output.put_line ('the value is two');

    END IF;
    END;


    It's my program example, the returned value is here two (the execution of another condition) even if Key1 is returned.

    Please advise, thank you in advnace.

    Dear user!

    That's only a guess, but I think that it is a problem of casessensitivity. If your query returns 'key1' or 'KEY1' and not 'Key1 '? Due to the fact that Oracle is casesensitive these three values are not equal. To solve your problem, you can use the LOWER-SQL function like this:

    DECLARE
      V_Key VARCHAR2(15);
      V_Value VARCHAR2(15);
    BEGIN
      SELECT try.key INTO V_Key
      FROM   TRY
      WHERE  value = 'Value1';
    
      IF(LOWER(V_Key)='key1') THEN
        DBMS_OUTPUT.PUT_LINE('the value is One');
      ELSE
        DBMS_OUTPUT.PUT_LINE('the value is Two');
      END IF;
    END ;
    /
    

    I hope this will help you along.

    Yours sincerely

    Florian W.

    Published by: Florian W. the 21.09.2010 08:15

  • Call PL SQL in SQL?

    Hi guru,.
    Can we call PL SQL in SQL?
    Thank you
    SQL> create function plsqlfunction return number
      2  as
      3  begin
      4    return 1;
      5  end;
      6  /
    
    Function created.
    
    SQL> select plsqlfunction from dual;
    
    PLSQLFUNCTION
    -------------
                1
    
    1 row selected.
    

    So, Yes.

    But not everything will work. Your code must conform to a level of purity, depending on where you use the service. You can read about them here: http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28425/pl_sql.htm#sthref187

    Kind regards
    Rob.

  • How to use group them by in PL/SQL

    Can someone give me an idea how to group the lines using PL/SQL? I want to do a push button that includes a certain number of lines. When I run the form and press the button, I get the error Oracle 01422. I use a data block, and after pressing run on the Oracle form in the browser web, I want to sort the rows by using the group by clause as trigger pl sql in a push button (with the ONCE PRESSED the shutter BUTTON). I am new to Oracle Forms.

    To do this, you create a view that contains the keyword GROUP BY, or use the property of block of data in query Data Source Name or use the Set_Block_Property (..., QUERY_DATA_SOURCE_NAME,...) built.

    See this article, in particular the 2.3.4 section

    François

  • Is it possible to block calls "Unknown Caller"?

    Is it possible to block calls "Unknown Caller"?

    I know how to block calls from numbers that are unrecognized, but when no phone number is detected, it doesn't seem to be a way to block these calls. (When you click on the "I" (information) in the histoet call, no option "call block" does exist.

    It is not possible on the phone, but contact your wireless carrier. Some offer this choice to their end, until the calls are even connected to your phone.

  • I have a 6 s with Verizon iPhone. Can I send/receive calls (using this service and calls on other devices functionality) on my iPhone 5s, who was with AT & T service, but has no service now since I switched to Verizon?

    I have a 6 s with Verizon iPhone. Can I send/receive calls (using this service and calls on other devices functionality) on my iPhone 5s, who was with AT & T service, but has no service now since I switched to Verizon?

    Note: I'm able to get two phones to ring with an incoming call, but the 5s consist not out. Whenever I dial a number, it says call failed.

    Do not dial a number. Try to choose a contact in the contacts App and tapping on telephone button.

    That said, I don't think that outgoing calls work on continuity since another iPhone. given that the iphone is designed to make calls through its own service.

    Document to support that you just did not mention calls from a secondary iPhone at all, it points to Mac, iPad and iPod touch, which leads me to believe that it won't work.

    It runs from devices such as iPads and Macs, who have no other way to place a cell call.

  • What happens when a number of blocked calls a person and they're on another line?

    What happens when a number of blocked calls the person and they're on another line? Does go directly to voicemail, or ring several times to voice mail?

    If "on the other line" means on another call and call waiting is activated, the blocked call goes straight to voicemail.

Maybe you are looking for

  • Which is better Air iPad or iPad Pro

    I prefer iPad Air. It is lighter and has a less glossy screen. Overall, it is best to use.

  • Failure of 9.3 iOS on iPad 2. Server will not activate

    Apple you have a failure of major software with the new iOS 9.3 on the ipad2 software downloads and treats, but she will be activated cannot restore from computer on itunes

  • Capacity in a report planning

    Hello I created this custom report, but I would like to add the Capacity-planning column. (you can watch the attached file tableau.png) I would use to see capacity planning, but it is seems they have too many settings and views for my development ski

  • Documentation of the table in the PROD?

    Hi all11.2.0.1AIX6What is a good practice that the PROD database has tables fiield description documentation?e.g. EMP:Field name Description==========                             ================EMPID employee IDName of employment ENAMEWhat views of

  • Remove the wrong spelling said among the options available in the dictionary

    Hello world! I'm working on a script with Adobe Story and I added an incorrect spelling for the dictionary. I'm looking for a way to remove that Word from the options offered. Thank you!