want to understand the stages of executing pl/sql code

Hello all;

I want to know the logic of programming for the pl/sql code, what I have written;

because I was late yesterday to resolve the simple error.

> > It's link https://forums.Oracle.com/thread/2565867

OK now that I have written my code same lineup, but few changes:

now it's working.  as I said above, I want to know the programming logic "flow of execution steps" of pl/sql code

1 DECLARE

2 a number: = 10;

3 number of b: = 20;

Number 4 c;

5 procedure findmin (x IN number, are there in numbers, number of Z OUT) IS

6 BEGIN

7 < < BLOCK1 > >

8 x if you can

9 z: = x;

10 other

11 z: = y;

12 end if;

13 END;

BEGIN 14

15 < < BLOCK2 > >

16 findmin(a, b, c);

17 DBMS_OUTPUT. Put_line (c);

18 * END;

19.

10

PL/SQL procedure successfully completed.

> > Is this process flow?  > >

1. the declaration part.

2 during playback findmin online no 5 then control passes to the line not 16.

3. after receving input values, control passes back to 5

4. then compiler executes the code accordingly.

Question: how many compiler Oracle will execute code written?

8f953842-815B-4D8C-833d-f2a3dd51e602 wrote:

1. the declaration part.

2 during playback findmin online no 5 then control passes to the line not 16.

3. after receving input values, control passes back to 5

4. then compiler executes the code accordingly.

Question: how many compiler Oracle will execute code written?

1. any declaration section is processed in order to declare and allocate the space/memory etc.  Including declaring the procedure in scope in memory (the procedure is not executed)

2 execution block to get the code begins with the first statement after BEGIN

3. the procedure is called in memory with the parameters passed to it.

4. when the procedure completes execution returns to the statement in the main execution block, after the procedure call.

Note:

The compiler is not executing code, it compiles just in memory or stored in the database (depending on whether it is an anonymous block or the stored procedure / package etc..)

The code isn't really jump 'line by line', because at the time when it is run, it is compiled down to a pcode (or native code if this is allowed), and which may contain several intermediate statements to run the underlying process.  The compiled code however keep track of line numbers of source code of error for the purposes of statement internally.

Tags: Database

Similar Questions

  • VM have been storage vMotioned to another data store, and now I have 3 VM with white "!" inside a red square and I want to understand the cause of this.

    VM have been storage vMotioned to another data store, and now I have 3 VM with white "!" inside a red square and I want to understand the cause of this.

    Can you try to make a vmotion host and see if it gets resolved? If not, can you close the virtual machine and start again? I have seen this problem before and a stop and start resolved.

  • What is the problem with this pl/sql code?

    What is the problem with this statement of the cursor? I am getting PLS-00341 error for her:
    CURSOR cur_rsource(p_sql_stmt IN VARCHAR2) IS
            SELECT plan_table_output FROM v$sql s, table(dbms_xplan.display_CURSOR(s.sql_id, s.child_number)) t WHERE sql_text LIKE '''%'||p_sql_stmt||'%''';
    How to solve this problem?

    Thank you

    Published by: PhoenixBai on December 14, 2009 14:05

    I don't have time right now to study exhaustively, but for me his vomit ORA-00942 table or view does not exist on this line:

        SELECT sql_id, child_number into tmp_sql_id, tmp_child_number
             from v$sql where sql_text like sql_statement||'%' and sql_text not like '%v$sql%';
    

    I am able to select from v$ sql in normal SQL as user I am compiling as, so don't know why it's complaing.

    Anyone know if there are certain restrictions on access to the views v$ through PL/SQL?

    EDIT: http://www.dbasupport.com/forums/showthread.php?t=22299

    Access to the views of $ v seems to be through a role - try giving explicit access to it.

    As SYS, you must grant select permissions on V_$ SQL (V$ SQL is synonymous with V_$ SQL) to your owner of the procedure. Just tested on my system and it allows him to compile.

    Published by: Cyn on December 14, 2009 10:30

  • want to understand the logical tables in SPR

    Hello

    tableA-> PKA
    tableB-> FKA and FKC
    tableC-> PKC

    I have one thing to ask, I am using obiee 11g.
    The SPR that I dragged and droppped a table called tableA
    Now, I have 2 other tables tableB and tableC

    So should I do drag and drop other 2 tables in the same table logic table where I tableA so here the source will display 3 tables
    or do I have to create another logical table that the source will be tableB, tableC abd?
    How the decision should be taken that I want to say on what basis.

    Since I pk to tableA and tableb Drop Drag in the custom of logical table even would it be a problem?

    Thank you

    If PK and FK are foreign key, primary key, respectively in the post, then you have a star schema is already planning to tableB as does. So, in this case you just drag as a new table and do modeling in the business layer as a pattern in the star.

    The need to by dragging in the same table in order to have several sources in this, would come in a snowflake model. The snowflakes are few relatively more standardized, and to make it not standardized, a table with several sources is used in the business model. Thus, a star schema is reached in these scenarios.

  • Reason for the Regex, filter separator in sql code

    Hello

    The problem I have is that the regular expression pattern below is catch the start 'go' and ending 'go' of a string.

    "(?iu)[(?<=\\s)]\\bgo\\b(?=\\s)"
    

    The idea is contagious to the whole-word, in this case the word is 'ok' so if the word is at the beginning of the string, or at the end, I still want to include it.


    Thus, for example:

    ' go select * from table1 go "-> should take 2s 'go' but catch 0

    ' go-go # select * from table1 - come on, come on "-> should also take 2s 'go' but catches 0

    "Let's go will select * from table1 go, go"-> must catch 4S 'go' but catcher 2

    I have the "[(?)]". "(< = \\s)] ' and the"(?=\\s) ' for the word 'go' when alongside a special character is not included, for example '-go '. "

    The problem is that it also denies the beginning and the end of the string.

    Code to test the example: it must split at 1st, 2nd and last "go", but only divides the 2nd "go".

    String s = "go go select * from table1 --go go";
    String delimiter = "go";
    
    String[] queries = s.split("(?iu)[(?<=\\s)]\\b" + delimiter + "\\b(?=\\s)");
    
    for (int i = 0; i < queries.length; i++) {
         System.out.println(queries[i]);
    }
    

    I really need to solve this problem, but I'm not having much success.

    Any help will be appreciated, thanks in advance.

    Finally, I think I have the solution:

    ( ? UI) [(? = \\s)]\\b(Go) |] (^ go) | (go$)? \\b ( ! \\S)

    It seams to reduce to nil the special characters and always match the beginning and end of line.

  • Hide the pause State Classic formatting SQL code?

    Hi... I created the classic report with break formatting and cheked sum of columns breaked

    It's the picture what it looks like:
    http://ImageShack.us/f/24/examplewl.jpg/

    Formatting break is to first colum (TC COMPANY) after first grouping column b amount (UKUPNO), and there at the end of the table on the next page he has SUM TOTAL.

    I want to create in the iReport but it ' not possible to see the query SQL of APEX defined formatting break.

    Does anyone now how exactly the same with the SQL query?

    Hello

    You can use SQL as indicated below to get the desired results:

    select 90 seq, empno, ename, hiredate, job, mgr, sal, comm, deptno from emp
    union all
    select 91 seq, null empno, null ename, null hiredate, null job, null mgr, sum(sal) sal, null comm, deptno
    from emp
    group by deptno
    union all
    select 92 seq, null empno, null ename, null hiredate, null job, null mgr, sum(sal) sal, null comm, 99 deptno
    from emp
    order by deptno, 1
    

    I hope this helps.

    Zahid

  • use of the server for executable files VI

    Hi all

    I tried to find a good explanation and example usage of VIserver to launch executables on client PC (XP) via a LAN to a PC (Win7) process controller. Basically, what I found for the controller is specified in this code snippet:

    The following was placed in the .ini file of the target at the time of construction to allow VIserver using an executable file (?):

    Server.TCP.Enabled = True
    Server.TCP.Access = "' + * '"
    Server.TCP.port = 3364
    Server.TCP.ACL = "290000000A000000010000001D00000003000000010000002A10000000030000000000010000000000"
    Server.VI.Access =""
    server.vi.callsEnabled = True
    server.vi.propertiesEnabled = True

    If a reference to an instance of application LV is open on the computer command on a specified port, and then a VI reference target

    for the .vi file (another instance?) opens on the same target for manipulation of knot VI. So what was lost for me is the executable

    I am trying to run the file. May not be wired to the terminal way to "ref Open VI". This implementation requires the .exe version and the version of VI

    I am trying to run the code? I launched with success of executable files over a LAN using plink with a script file. Problem is that I can't find a way

    get the target executables once loaded. There is most likely a C solution for this (I'll take it if anyone knows!), but since has VIserver of tools

    to control the execution, I would use it. Also, I want to understand the version of VI of the programme and the .exe in this case (s) link

    Version. Any help would be greatly appreciated.

    lb

    Ben OK,

    Your messages made me a technique to load with distance and running an exe file, built in LV8.5:

    1. to load: the controller emits a "tasklist" command to a target. The objective produces an output file of tasklist which is read by the controller. If it concludes that the target is already loaded, the controller will execute it with an invoke command node 'run a VI '.

    2. If the target is not loaded, then a script file is executed on the target via plink of the controller. This command will also start running.

    3. all the subVIs must reside on the target, as you said, even if (as in my case), the target has no LV Developer Suite installed. I placed Traoré versions of files and folders to exe in the same folder.

    4. the .ini file in the compilation has changed as shown in the first post of this thread. No special settings were used in the compilation.

    This probably isn't the exact technique you had in mind, but it doesn't seem to work... Thanks again for your help.

    lb

  • need to understand the license format

    Dear team,

    I want to understand the model of vsphere 4 (CPU/Socket/Core/vRAM) licenses and we also know how vpshere 5 licenses work...

    concerning

    Mr. VMware

    Hey,.

    in vSphere 4, you can buy 1 license per physical processor on the motherboard of your ESXi server. The Stanard and Enterprise license allows 6 cores per processor, Advanced and Enterprise Plus 12 cores per CPU.

    in vSphere 5, you still need 1 license per physical processor, but the basis of the physical CPU limiting disappeared.

    vSphere 4 had a physical RAM by limitation of server of 256 GB (unlimited in Enterprise Plus), which went into vSphere 5.

    vRAM limitation was there for a short period in vSphere 5 but disappeared again.

    For a quick overview of vSphere 5 licenses have a look here: compare VMware vSphere Editions

    Could not find an official table of vSphere 4 more, but Remon Lam posted a picture on his blog: http://www.virtualclouds.info/?p=1506

    Concerning

  • understand the average physics to share the virtual disk

    Hello

    I wanted to understand the physical way to share a virtual disk by configuring the scsi controller.

    ShareDisks.JPG

    As you can see in the image as an attachment, I chose the option - "physical - virtual disks can be shared between virtual machines on a server any."

    So, I have a scenario and please let me know if the above applies or not?

    I have 2 ESX host. I have created a virtual machine on ESX host1 and now I want the virtual disk of the virtual machine to be shared and eventually used by the virtual machine on the other ESX host2. can I use the option above to satisfy my need?

    Also on a special note, 2 ESX hosts are not on the shared storage. they run with their own local disk.

    Still, I'll be able to do what I want?

    Thanks in advance.

    No storage shared or using the storage equipment. The 2nd esxi host does not see the local storage on the original host.

    Discover will have on the creation of a Cluster of Mirosft see how you can share disks. You can create a cluster in a box on the same host or use of RDM with shared storage to allow multiple vm' hosts aces acros the same storage.

    http://KB.VMware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalID=1004617

  • How to make the artificial delay in pl/sql forms

    Hi gurus,

    I use
    Forms [32 Bit] Version 10.1.2.0.2 (Production)
    Oracle Toolkit Version 10.1.2.0.2 (Production)
    PL/SQL Version 10.1.0.4.2 (Production)
    Oracle Procedure Builder V10.1.2.0.2 - Production
    In fact I do Bulk SMS sending program using java classes. code works fine in the java platform...

    even class I call oracle forms, but the code executes even less then a second. but I want to stop the execution of a pl/sql stored procedure for 3 seconds until this java class sends sms to the number of the body... and then iterate towards the following.

    for example
      for i in 1..100 loop
          stored_procedure_having_javaclass(org1 ,arg2);
          deley_of_secends(3);
       end loop;
    for this, I tried...
            dbms_look.sleep(3);
    While using this database of anonymous block level it works very well, I think that a stored procedure and then call him on oracle forms, but when to use even in the stored procedure, it gives me error that this function must be declared, as I can't use this feature friendly oracle forms.

    What should I do?
    Thank you
    with regard to:
    Usman noshahi

    Hello

    Grant execute on DBMS_LOCK to PMS.

    Make sure that you are logged in as sys.

    Kind regards
    Alex

    If someone useful or appropriate please mark accordingly.

  • issue in the creation of the IOM group reactivate via sql query.

    Hi guys,.

    I am trying to create a group to IOM database through sql query:

    insert into ugp(ugp_key,ugp_name,ugp_create,ugp_update,ugp_createby,ugp_updateby,) values(786,'dbrole','09-jul-12','09-jul-12',1,1);

    It is the inclusion of the group in the table of the PMU, but he does not appear in the administration console.

    After that, I also tried with this query:

    insert into gpp(ugp_key,gpp_ugp_key,gpp_write,gpp_delete,gpp_create,gpp_createby,gpp_update,gpp_updateby) values (786,1,1,1,'09-jul-12',1,'09-jul-12',1);

    After I haven't tried with this query.but still no use.

    and I also tried to assign a user to the group through query:

    insert into usg(ugp_key,usr_key,usg_priority,usg_create,usg_update,usg_createby,usg_updateby) values (4,81,1,'09-jul-12','09-jul-12',1,1);

    But always the same problem.it is the insertion in db.but do not enter in the administration console.

    Thank you
    Hanuman.

    Muriel Hanuman says:
    Thanks guys.the above queries are successfully.just to work I rebooted the server.

    I certify here if we want to add the group to 10g through sql query, then insert the records in the tables 'PMU' and 'MPP '.

    11 g, need to add records from the ugp only table. Because the administrator has also not found in this table only.so no need to table gpp.

    Thank you
    Hanuman.T

    1 groups are stored in the table of the PMU to IOM 11.1.1.5. The table of the GPP is present, but not used in 11.1.1.3 and is totally deleted schema repo in 11.1.1.5
    2. as far as I know, there is no other vital records except that in UGP table objects are created for a group, you are, in theory, able to create groups with direct SQL. Using the API of the IOM is the preferred method.
    3. you must use the sequence UGP_SEQ to get a new key for a group that you create.

    Vladimir

  • Get the bind variables name string SQL or the cursor

    Hello

    Is there way to get of the bind variables name string SQL or the cursor?

    Example of
    DECLARE
      l_sql VARCHAR2(2000);
      desctab DBMS_SQL.DESC_TAB;
      curid   PLS_INTEGER;
    BEGIN
    
      l_sql := 'SELECT * FROM emp WHERE mgr = :X and deptno = :Y';
    
      curid := dbms_sql.open_cursor;
      dbms_sql.parse(curid, l_sql, dbms_sql.NATIVE);
      ....
    END;
    What I mean with the SQL string:
    I love to get using some functions from above code variable l_sql all the bind variable.
    In this case the function should return array where is for example: X and: Y

    Back to bind the cursor variable names, I mean same but rather string I pass number of cursor.

    Y at - it sucks ready function or some may share a code customized for this purpose?

    Thanks

    Kind regards
    Jari

    http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0Regards,

    Published by: jarola December 19, 2011 02:44

    I found there are wwv_flow_utilities.get_binds of the function not documented in APEX packages that do what I want.
    Usage example
    set serveroutput on
    DECLARE
      binds DBMS_SQL.varchar2_table;
    BEGIN
      binds := wwv_flow_utilities.get_binds('select :P1_TEST from dual');
      FOR i IN 1 .. binds.count
      LOOP
        dbms_output.put_line(binds(i));
      END LOOP;
    END;
    /
    
    anonymous block completed
    :P1_TEST
    But I would not use these functions without papers as those who can change or there is no future versions APEX.
    Is there a documented function or the custom function that do the same thing as wwv_flow_utilities.get_binds?

    Some old basic example code of my friends. Also the media getting the bind variable of PL/SQL code blocks anon.

    SQL> create or replace function GetBindVariables( statement varchar2 ) return TStrings is
      2          --// bind variables names are terminated by one the following special chars
      3          SPECIAL_CHAR    constant TStrings := TStrings(' ',')','+','-','>','<','*',',','=',';',CHR(10),CHR(13));
      4
      5          --// max size of a bind var name
      6          MAX_VARSIZE     constant integer := 100;
      7
      8          pos     integer;
      9          pos1    integer;
     10          occur   integer;
     11          varName varchar2(100);
     12          varList TStrings;
     13  begin
     14          varList := new TStrings();
     15
     16          --// looking for the 1st occurance of a bind variable
     17          occur := 1;
     18
     19          loop
     20                  pos := InStr( statement, ':', 1, occur );
     21                  exit when pos = 0;
     22
     23                  varName := SubStr( statement, pos, 100 );
     24
     25                  --// find the terminating char trailing the
     26                  --// bind variable name
     27                  pos1 := Length( varName );
     28                  for i in 1..SPECIAL_CHAR.Count
     29                  loop
     30                          pos := InStr( varName, SPECIAL_CHAR(i) ) - 1;
     31                          if (pos > 0) and (pos < pos1) then
     32                                  pos1 := pos;
     33                          end if;
     34                  end loop;
     35
     36                  --// extract the actual bind var name (without
     37                  --// colon char prefix)
     38                  varName := SubStr( varName, 2, pos1-1 );
     39
     40                  --// maintain a unique list of var names
     41                  if not varName member of varList then
     42                          varList.Extend(1);
     43                          varList( varList.Count ) := varName;
     44                  end if;
     45
     46                  --// look for the next occurance
     47                  occur := occur + 1;
     48          end loop;
     49
     50          return( varList );
     51  end;
     52  /
    
    Function created.
    
    SQL>
    SQL> select
      2          column_value as BIND_VAR
      3  from TABLE(
      4          GetBindVariables('select * from foo where col=:BIND1 and day = to_date(:B2,''yyyy/mm/dd'')')
      5  );
    
    BIND_VAR
    ------------------------------
    BIND1
    B2
    
    SQL> 
    

    PS. just realize this code is case-sensitive, while variable bind is not. Should throw a upper() or lower() by adding the name of the var to the list - never really a problem for me because I'm pretty tense when it use cases correctly in the code. ;-)

    Published by: Billy Verreynne, December 19, 2011 06:19

  • Whenever I want to open twitter "this connection is Untrusted"comes to the screen, but her option "I understand the risks" never comes. " What to do &gt; help

    When I try to open the twitter/facebook etc, as sites the message that this connection is not approved appears on the screen. After some instructions another words in bold comes technical does not come from the details but "I understand the risks". What to do. Help step by step the pl

    Hi Linda, can you start at the top of this discussion and see if you can identify a particular program or a device that is intercepting your secure connections?

    If you want personal assistance, please start a new question and include your system information.

    https://support.Mozilla.org/questions/new/desktop/fix-problems

    Scroll down to the suggested items passed to continue entering in your question.

  • I do understand the benefit of "Options" tab utilities and want to remove it. How, please?

    I do understand the benefit of "Options" tab utilities and want to remove it. How, please? I tried this feature because the tab 'Fox' was no longer available with the 5.0 update.

    I loved tab 'Fox '. A click and go on a site added you to 'top sites' before. The update 5.0, this feature is no longer available. It was a disappointment. There is a similar feature "add on" that is, as tab 'Fox' compatible with 5.0. If yes I would like to know about it. Or better yet... make it usable with Firefox 5.0 ' Fox' tab if upgrades cancel features previously downloaded that work really... What's the point?

    Please click the button solved it next to the answer that solved your problem of Firefox support, it appears when you are connected, so this thread is marked as resolved to help other users who may have this same problem.

  • I do not understand this step "we can assume any MAC address we want by finding the key that controls the NIC we want to change.

    Hello
    anyone ever did in Winxp with success. I do not understand this step

    «We can assume that any MAC address, we want by finding the key that controls the NIC we want change, put in a value chain called "NetworkAddress" and affecting the MAC address we want to use formatted as a hexadecimal 12-digit number (example: 000000000001).»

    It is a part of the "Windows 2000/XP/Vista: The Hard Way.

    from this link
    http://www.irongeek.com/i.php?page=security/changemac

    Concerning

    original title: change MAC address

    Hello

    I suggest to refer to this thread and follow the steps in this thread and check if that helps:

    http://social.technet.Microsoft.com/forums/en/w7itpronetworking/thread/697bf48c-A226-4315-8875-2bbeddf16db2

    The steps in this link are for Windows 7 and they are valid for Windows XP.

    It will be useful.

Maybe you are looking for