Abt proc. exec.

I have one doubt that if I run one stroed procedure & compile it then its execution plan is generated that means every time u compile the procedure
execution plan is generated or not???
if generated then again this type query fire then it's goes to & take the record from that so no need to every time goes to physical location of the datafile.
I know that for my this query suppose 2000 new records so no need to go again this buffer & search so I simply write in my stored procedure create/replace procedure <name>as with recompile .
so that every time the new execution plan generate & expire. So how can i check that yes every time new execution plan generated & expire.

Elapsed time isn't a very good measure to use to compare, there are so many factors that could cause the differences.
Suggest you switch sql_trace on and run a tkprof for each user and compare the outputs.

Similar Messages

  • When proc:::exec fires curpsinfo has values for child ?

    Hello,
    In DTrace manual it says :
    The exec probe fires before the process image is loaded. Process variables like execname and <b>curpsinfo</b> therefore contain the process state <b>before the image is loaded</b>
    I tried the following script:
    #pragma D option quiet
    proc:::exec
        self->parent = execname;
        self->mypid = curpsinfo->pr_pid;
        printf("Exec_name = %s  PID= %d\n", execname, curpsinfo->pr_pid);
    proc:::exec-success
    / self->parent != NULL /
       printf("<%s> with PID <%d> executed <%s>", self->parent, self->mypid, execname);
       printf(" args_no: <%d> arg_list: <%s>\n", curpsinfo->pr_argc, curpsinfo->pr_psargs );
       self->parent = NULL;
       self->mypid=0;
    proc:::exec-failure
    / self->parent != NULL /
      self->parent = NULL;
      self->mypid = 0;
    I ran the script and in another shell I typed:
    vgrama ~$ sleep 10 &
    [3] 5758The DTrace script produced:
    Exec_name = bash  PID= 5758
    <bash> with PID <5758> executed  args_no: <2> arg_list: As you can see, exec_name is the name of the parent (bash), while the PID is that of the child (sleep).
    So it seems to me that when the probe fires the curpsinfo structure has data corresponding to the child process
    Vlad.

    Hello,
    In DTrace manual it says :
    The exec probe fires before the process image is
    loaded. Process variables like execname and
    curpsinfo therefore contain the process state
    before the image is loadedThat is both what it says and correct.
    As you can see, exec_name is the name of the parent
    (bash), while the PID is that of the child (sleep).
    So it seems to me that when the probe fires the
    curpsinfo structure has data corresponding to the
    child process"Parent" and "Child" is not the usual terminology for exec(3C) -- there's
    just an old process image and a new process image. The data is
    for the old process image -- exec(3C) does not change the pid, since
    the new process replaces the old process.
    - jonathan

  • Proc Exec time varies by User

    Hi all,
    I have an interesting problem at hand. Oracle 8.1.7.4.1.
    I have a proc owned by user A; User B has all privs to run the proc. When I run the proc logged into SQLPlus as User A, it executes in 44 sec; whereas User B takes 23 mins and 36 secs.
    I looked at the explain plan and it is the same for both executions. What am I missing?
    Any help would be appreciated.
    Regards
    Chitra

    Elapsed time isn't a very good measure to use to compare, there are so many factors that could cause the differences.
    Suggest you switch sql_trace on and run a tkprof for each user and compare the outputs.

  • Weird exec failure

    Hello,
    This is not a DTrace question, rather a question about suggestions on how I could find more information (possibly with DTrace's help) related to the problem that I am going to describe:
    One user has a simple Fortran program - one single source file. The user has about 15 copies of the source file, the difference between them being the value of a parameter. After he starts 12 such processes, when he tries to start another one the answer at the shell prompt is simply 'Killed'.
    I assume nothing about what the program tries to do although I can get the source for it. What I tried to find out was why this process was killed.
    The system on which the user tried this has 24 processors and runs Solaris 9.
    First I thought it could be some resource limit, but I tried as root and the same thing happened ('Killed' when running more than 12 processes at the same time).
    The BSM record for a failed exec looks like this:
    ============================================
    <record version="2" event="execve(2)" modifier="fe" time="Sun Sep 12 01:38:19 EEST 2004" msec="914">
    <path>/export/home/keyusers/vgrama/rez18.1.5</path>
    <attribute mode="100750" uid="vgrama" gid="other" fsid="155" nodeid="4748945" device="0"/>
    <exec_args><arg>./rez18.1.5
    </arg></exec_args>
    <subject audit-uid="vgrama" uid="vgrama" gid="keyusers" ruid="vgrama" rgid="keyusers" pid="23211" sid="20107" tid="0 52862 e420"/>
    <return errval="failure: Resource temporarily unavailable" retval="-1"/>
    </record>
    =============================================
    The 24 processor system on which I ran this has just been upgraded. Since I already have Sun ONE Studio 9 installed on other systems, I tried compiling and running the program on a 2-processor server, one running Solaris 9 as well. On this one, after running 3 processes concurrently I got the same message.
    For the record, when running only one process, I can do ldd and the output is
    ==========
    libf77compat.so.1 => /opt/SUNWspro/lib/libf77compat.so.1
    libfui.so.1 => /opt/SUNWspro/lib/libfui.so.1
    libfai.so.2 => /opt/SUNWspro/lib/v8plus/libfai.so.2
    libfai2.so.2 => /opt/SUNWspro/lib/v8plus/libfai2.so.2
    libfsumai.so.1 => /opt/SUNWspro/lib/v8plus/libfsumai.so.1
    libfprodai.so.1 => /opt/SUNWspro/lib/v8plus/libfprodai.so.1
    libfminlai.so.1 => /opt/SUNWspro/lib/v8plus/libfminlai.so.1
    libfmaxlai.so.1 => /opt/SUNWspro/lib/v8plus/libfmaxlai.so.1
    libfminvai.so.1 => /opt/SUNWspro/lib/v8plus/libfminvai.so.1
    libfmaxvai.so.1 => /opt/SUNWspro/lib/v8plus/libfmaxvai.so.1
    libfsu.so.1 => /opt/SUNWspro/lib/v8plus/libfsu.so.1
    libsunmath.so.1 => /opt/SUNWspro/lib/libsunmath.so.1
    libm.so.1 => /lib/libm.so.1
    libc.so.1 => /lib/libc.so.1
    libdl.so.1 => /lib/libdl.so.1
    /opt/SUNWspro/prod/lib/cpu/sparcv8plus+vis/libfai_isa.so.2
    /opt/SUNWspro/prod/lib/cpu/sparcv8plus+vis/libfai2_isa.so.2
    /opt/SUNWspro/prod/lib/cpu/sparcv8plus+vis/libfsumai_isa.so.1
    /opt/SUNWspro/prod/lib/cpu/sparcv8plus+vis/libfprodai_isa.so.1
    /opt/SUNWspro/prod/lib/cpu/sparcv8plus+vis/libfminlai_isa.so.1
    /opt/SUNWspro/prod/lib/cpu/sparcv8plus+vis/libfmaxlai_isa.so.1
    /opt/SUNWspro/prod/lib/cpu/sparcv8plus+vis/libfminvai_isa.so.1
    /opt/SUNWspro/prod/lib/cpu/sparcv8plus+vis/libfmaxvai_isa.so.1
    /opt/SUNWspro/prod/lib/v8plus/../cpu/sparcv8plus+vis/libfsu_isa.so.1
    /usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
    ==========
    What surprises me is that even 'ldd <program>' doesn't work (after having enough instances of the process running)
    =============
    # ldd ./rez_1.5
    ldd: ./rez_1.5: execution failed due to signal 9
    =============
    On a workstation (1 processor) with Solaris Express b58 I ran the command while doing a
    dtrace -n '::*kill*:{printf ("Entered %s\n", probefunc);}'
    in another shell. Nothing appeared, although ldd reported "execution failed due to signal 9" as well.
    No matter what that program may be trying to do, this all seems weird to me. Am I wrong ?
    Just getting a SIGKILL so abruptly ?
    Any ideas ?
    What other probes could be helpful for seeing signals while they are being sent ?
    Thank you,
    Vlad.

    Once exec(2) has passed the point where the old
    address space has been destroyed, the only way it can
    fail is by killing the process itself. My bet is that
    the program has a rather large BSS segment, and there
    isn't enough swap to reserve the space. (ldd(1) works
    by setting up some environment variables, then running
    the program itself, which is why it would fail)
    To verify this, you can run /usr/ccs/bin/size
    /path/to/program The third field is the BSS
    segment.
    You are right:
    $ size ./rez15
    28468 + 940 + 1200000976 = 1200030384which is roughly 1GB.
    You could also look at the proc:::exec-failure probe,
    which will probably give the same answer BSM does --
    EAGAIN.
    What other probes could be helpful for seeingsignals
    while they are being sent ? You should look at the proc provider -- in particular,
    proc:::signal-send.Thank you very much for the answer.
    I first thought memory could be the limiting resource. I dismissed the idea because vmstat showed a lot of free space. So did '::memstat' in mdb -k - reported 87% free.
    Now that you told me what the problem is I see the only command that shows me I don't have enough memory is swap -s :
    $ swap -s
    total: 129136k bytes allocated + 11656752k reserved = 11785888k used, 3454144k availableWhich shows a lot of memory reserved.
    And running ps -o vsz I can see 1 GB for each process.
    In general I think the performance parameters from the output of commands like vmstat,mpstat,iostat,swap could be documented in more detail.
    At least the basics.
    For instance, could I find documentation on reserved memory ?
    Thanks again for your reply,
    Vlad

  • How to re-generate a scall style transcriptional replication customer proc for update?

    Hi ,
    Does anyone know that how to re-generate a scall style transcriptional replication customer update proc ?
    For example i want to re-generate a customer update proc:
    -- get article id
    select artid,name,upd_cmd from dbo.sysarticles
    where name='xmltest'
    --artid name
    upd_cmd
    --11 xmltest
    SCALL [sp_MSupd_dboxmltest]
    -- try re-generate customer update proc
    exec sp_scriptmappedupdproc 11
    -- try re-generate customer update proc
    exec sp_scriptdynamicupdproc '11'
    -- and all get errors below:
    Msg 14156, Level 16, State 1, Procedure sp_scriptupdproccore, Line 217
    The custom stored procedure calling the format for the update command specified in the article definition does not match the MCALL format.
    Many thanks.

    I am sorry - do not use this stored procedure call.
    For the error
    The custom stored procedure calling the format for the update command specified in the article definition does not match the MCALL format.
    You should use this stored procedure - sp_scriptmappedupdproc
    Tom, I am assuming that this question is for a dev environment. I am assuming you are answering a question assuming a that this is an unmanaged environment where schema changes are being made in production
    with no regression testing or promotion through a dev environment.
    If it truly is an unmanaged production environment (and I suspect it is) it is all bets off whether my suggestion will fix the problem or not, but it might get the user through this particular problem only to stumble on the next problem.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

  • SQL server report based on store proc not showing fields

    Im working in SQL Server 2008 R2. Created stored proc (EXEC dynamic sql with CASE THEN ELSE ) on server with parameters works ok. But Report Builder on insert table not showing fields for arrange!
    I found WORKAROUND http://forums.yessoftware.com/posts.php?post_id=115829
    But there is a easy way?

    I solved - add defaults to parameters and Report Builder can detect columns
    Its a Report Builder bug - it not ask for parameters when refresh fields

  • Error when running process

    Hi I get following error when executing process in htmldb. Process type used is Anonymous PLSQL block executing following >> EXEC PRE_AUD.TRANS.DBSTAT_ALL
    error is ORA-06550: line 1, column 12: PLS-00103: Encountered the symbol "PRE_AUD" when expecting one of the following: := . ( @ % ; The symbol ":=" was substituted for "PRE_AUD" to continue.
    Can I not execute package/proc > EXEC PRE_AUD.TRANS.DBSTAT_ALL as anonymous block?
    thanks

    Vinat,
    "EXEC" or "EXECUTE" is a SQL*Plus command. Your PL/SQL process should simply be:
    PRE_AUD.TRANS.DBSTAT_ALL;
    Joel

  • 'In Between' Date Prompt to set Session Variables???

    Hi
    Im very new to OBIEE and was hoping someone could help me. I have a date prompt using the 'in between' operator based on a date column.
    I am trying to set up a table in the Physical layer of the RPD using a stored proc (EXEC sp_name). The stored proc takes 2 input paramaters - a start data and an end date. These dates i would like to come from the in between prompt. I have set up the physical table structure to receive the results of the request.
    I looked at setting a session variable but it is asking me to insert sql to set the value and i dont want to hit the database outside of the stored proc. Also, even if i have session variables i cant see how to set them to the values in the prompt when using the 'In Between' operator.
    Im really very confused and i have been searching the net and the documentation for any clue.
    Any help would be appreciated
    Thanks

    In between operator doesn't support presentation variable..
    so break this into is into two prompts...and use equal to operator, then you can use them as request variables which will in turn override your session variables.
    in the report use operator between and use these variables in the filter..

  • Java Procedure

    --connect as system to grant permisiions to scott
    --java classes
    connect system/manager@srinivas
    begin
    dbms_java.grant_permission
    ('SCOTT',
    'java.io.FilePermission',
    'h:\oracle\loader_scripts',
    'read');
    dbms_java.grant_permission
    ('SCOTT',
    'java.io.FilePermission',
    'sqlldr.exe',
    'execute');
    dbms_java.grant_permission
    ('SCOTT',
    'java.lang.RuntimePermission',
    'writerFileDescriptor');
    end;
    -- now connect as scott
    connect scott/tiger@srinivas
    -- create a temporary table
    drop table dir_list;
    create table dir_list
    (filename varchar2(255))
    --create java source
    drop java source "DirList";
    create or replace
    and resolve java source named "DirList"
    as
    import java.io.*;
    import java.sql.*;
    public class DirList
    public static void getList(String directory)
                   throws SQLException
         File path = new File(directory);
         String[] list = path.list();
         String element;
         for (int i=0; i < list.length; i++)
              element = list;
              #sql { insert into dir_list(filename)
              values(:element)
    -- create procedure
    drop procedure get_dir_list;
    create or replace procedure get_dir_list(p_directory in varchar2)
    as
    language java
    name 'DirList.getList( java.lang.String)';
    -- execute the proc
    exec get_dir_list('h:\oracle\loader_scripts');
    -- select the data from dirlist temporary table to make sure that data is there
    select * from dir_list;
    rem      connect as scott/tiger and then create this java source
    create or replace and compile
    java source named "Util"
    as
    import java.io.*;
    import java.lang.*;
    public class Util extends Object
    public static int RunThis(String[] args)
    Runtime rt = Runtime.getRuntime();
    int rc = -1;
    try
                   Process p = rt.exec(args[0]);
    int bufSize = 4096;
    BufferedInputStream bis =
    new BufferedInputStream(p.getInputStream(), bufSize);
    int len;
    byte buffer[]=new byte[bufSize];
                   while((len=bis.read(buffer,0,bufSize)) != -1)
                   System.out.write(buffer,0,len);
                   rc=p.waitFor();
    catch (Exception e)
    e.printStackTrace();
    rc = -1;
    finally
    return rc;
    rem now create a function
    connect scott/tiger@srinivas
    create or replace function run_cmd(p_cmd in varchar2) return number
    as
    language java
    name 'Util.RunThis(java.lang.String[]) return integer';
    rem create this procedure as scott
    create or replace procedure Exec_Cmd(p_cmd in varchar2)
    as
    x number;
    v_date_format varchar2(255);
    begin
    v_date_format:='mon-dd-yyyy hh24:mi:ss';
    Execute immediate ' alter session set nls_date_format ='''|| v_date_format||'''';
    x:=run_cmd(p_cmd);
    if x = 0 then
    INSERT INTO TAB_LOAD_FAIL_DETAIL (
                        DATETIME,
                        RESULT,
    DISCARD_DIR,
    BAD_DIR,
    LOG_DIR
    VALUES (
    sysdate,
    'Succeeded',
                        'H:\Oracle\ldr_discard\',
                        'H:\Oracle\ldr_bad\',
    'H:\Oracle\ldr_log\'
    commit;
    elsif x <> 0 then
    INSERT INTO TAB_LOAD_FAIL_DETAIL (
                        DATETIME,
                        RESULT,
    DISCARD_DIR,
    BAD_DIR,
    LOG_DIR
    VALUES (
    sysdate,
    'Failed',
                        'H:\Oracle\ldr_discard\',
                        'H:\Oracle\ldr_bad\',
    'H:\Oracle\ldr_log\'
    commit;
    end if;
    end;
    CREATE OR REPLACE PROCEDURE compare_file_name
    as
    cursor tab is select table_name from dba_tables where owner =user;
    v_file varchar2(255);
    v_date_format varchar2(255);
    v_cmd_string varchar2(255);
    begin
    Execute immediate' delete from dir_list';
    get_dir_list('H:\Oracle\loader_scripts');
    v_date_format:='mon-dd-yyyy hh24:mi:ss';
    Execute immediate ' alter session set nls_date_format ='''|| v_date_format||'''';
    for tab_rec in tab loop
    --dbms_output.put_line(tab_rec.table_name);
    for x in (select upper(substr(filename,1,instr(filename,'.')-1)) filename from dir_list)
    loop
    v_file := x.filename;
    if tab_rec.table_name = v_file then
                   INSERT INTO TAB_LOAD_DATA_DETAIL
                   VALUES ( sysdate,tab_rec.table_name,'H:\Oracle\loader_scripts\'||v_file||'.dat');
                   commit;
                   dbms_output.put_line(tab_rec.table_name ||' '||v_file||' '||' You Got that');
                        Exec_Cmd(chr(39)||'sqlldr parfile=H:\Oracle\ldr_par_files\'||tab_rec.table_name||'.ctl'||chr(39));
    end if;
    end loop;
    end loop;
    end;
    EXEC COMPARE_FILE_NAME;
    when executed the following errors are observed
    ================================================
    it is failing to execute sql loader with the following messages
    EMP EMP You Got that
    java.io.IOException
    at oracle.aurora.java.lang.OracleProcess.create(OracleProcess.java)
    at oracle.aurora.java.lang.OracleProcess.construct(OracleProcess.java)
    at java.lang.Runtime.execInternal(Runtime.java)
    at java.lang.Runtime.exec(Runtime.java:272)
    at java.lang.Runtime.exec(Runtime.java:195)
    at java.lang.Runtime.exec(Runtime.java:152)
    at Util.RunThis(Util:12)
    PL/SQL procedure successfully completed.
    ===================================
    my email id is [email protected]
    ====================================
    help me execute sql loader successfully through this procedure.
    thanks for the help in advance.

    SQL> create or replace and resolve java source named PrimeClass as
      2 
      3  public class PrimeClass {
      4 
      5   public static boolean isPrime ( int num )
      6    {
      7      boolean prime = true;
      8      int limit = (int) Math.sqrt ( num ); 
      9 
    10      for ( int i = 2; i <= limit; i++ )
    11      {
    12        if ( num % i == 0 )
    13        {
    14          prime = false;
    15         break;
    16        }
    17      }
    18     
    19      return prime;
    20    }
    21   
    22    }
    23  /
    Java created.
    SQL> create or replace function myprime (p_str in number) return number as
      2 
      3  language Java name 'PrimeClass.isPrime(int) return int';
      4  /
    Function created.
    SQL>
    SQL> set serveroutput on
    SQL>
    SQL> declare
      2  l_str  number;
      3  begin
      4  l_str :=  myprime(11);
      5  if l_str=0 then
      6  dbms_output.put_line('number is not prime');
      7  else
      8  dbms_output.put_line('number is prime'); 
      9  end if;
    10  end;
    11  /
    number is prime
    PL/SQL procedure successfully completed.

  • Passing parameter in stored procedure

    Hi, I am really new to using Oracle stored procedure. I have just tested a sample stored proc which should return multiple rows without passing any parameter.
    here is the stored proc I wrote
    create or replace procedure get_address
    as
    cur_table sys_refcursor;
    begin
    open cur_table for
    select * from address_table order by addr_id;
    end;
    when I execute it, I get a message "Procedure Created"
    then I executed the stored proc
    exec get_address;
    I again get a message "PL/SQL procedure successfully completed" and I do not see the records at all.
    so I decide to rewrite to the stored proc as such
    create or replace procedure get_address(cur_table out sys_refcursor)
    as
    begin
    open cur_table for
    select * from address_table order by addr_id;
    end;
    everthing is good so far.
    now when execute it
    exec get_address;
    I am getting the following error:
    "PLS-00306: wrong number or types of arguments in call to 'TESTCODEPROC'"
    I have searched so many places, but there is no document talks about this issue. I hope someone can help me to over come this. I need to call this stored proc from .NET 2.0 reporting viewer which is embedded in asp.net page.
    Thank you.

    so I decide to rewrite to the stored proc as such
    create or replace procedure get_address(cur_table out
    sys_refcursor)
    as
    begin
    open cur_table for
    select * from address_table order by addr_id;
    end;
    everthing is good so far.
    now when execute it
    exec get_address;
    I am getting the following error:
    "PLS-00306: wrong number or types of arguments in
    call to 'TESTCODEPROC'"
    From what you wrote I can assume that you have used SQL server before. Oracle does not automatically return the last opened cursor from a stored procedure like the query result, so you cannot just call exec get_address; (or just execute the procedure from .NET code). You will have to pass the cursor parameter and fetch it as an output parameter value in .NET, then use it to get the data reader etc.
    On the other hand, you can just execute the statement directly. I see a lot of folks coming from SQL server world using stored procedures like crazy even for things that are naturally suited to queries and views. Oracle view allows you to apply the same security restrictions you can put onto a stored procedure, and if you use statement caching and bound variables, you get precompilation benefits as well with a view. Using a view instead of a procedure in this case will require less code both in the database and in .NET, and will give you a more flexible interface in terms of retrieved columns and ordering.
    gojko adzic
    http://gojko.net

  • XML function not getting compiled in Pro C

    Hello
    I have written following statement in ProC
              EXEC SQL
              select extract(x.xml_data,'//ADDRESS/SERVERS/@REFSYSTEM').getStringVal(),
    extract(x.xml_data,'//ADDRESS/SERVERS/text()').getNumberVal()
              INTO :h_refsystem,
              :h_reftext
    from xml_str_table x
    where key_no = 1234
    and x.xml_data.existsNode('//ADDRESS/SERVERS[@REFSYSTEM="ORACLE"]') = 1 ;
    and when compiled it give error " extract(x.xml_data,'//ADDRESS/SERVERS/@REFSYSTEM').getStringVal()
                                                      *. should be replaced with date, time etc*
    Above query is returning output when I run on Oracle, but same code is not getting compiled in Pro C. Can you please advise what should be done to resolve this issue?
    Thanks in advance,

    Hello!
    I found out that the problem was not in the variable os_create_id as I described before, instead in the another variable, l_temp_sku.
    But a strange behaviour persists.
    The program aborts strangely, if the following variable l_temp_sku isn't initialised like this:
    l_temp_sku[0] = '\0'; (if this is done the pro*c runs ok)
    This variable gets it value from a Output variable of the package called, and these have the same length, as you can see above.
    In the old machine (version 8.1.3.0 as already mentioned) it worked fine without initialisation.
    The (strings) precompiler options are the following:
    dbms=v8
    char_map=string (We already tried to change this to VARCHAR2)
    My questions are:
    Is this a normal behaviour or is this a non documented feature (bug) ?
    Is there any precompiler option that solves this kind of problems ?
    We have lots of Pro*C´s with situations like this one, our problem is if all these programs start to blow without warning. Only after lots of time spent around this Pro*C we found where was the problem, and what kind of problem.
    /* Code Extract: */
    char ls_error_msg[NULL_ERROR];
    EXEC SQL VAR ls_error_msg IS STRING(NULL_ERROR);
    char l_temp_sku[NULL_SKU];
    EXEC SQL VAR l_temp_sku IS STRING(NULL_SKU);
    EXEC SQL EXECUTE
    DECLARE
    L_table VARCHAR(50) := NULL;
    L_sub_sku WIN_WH.sku%TYPE := NULL;
    L_avail_stock WIN_WH.STOCK_ON_HAND%TYPE := NULL;
    O_error_message VARCHAR2(255) := NULL;
    BEGIN
    if NB_SUB_SKU_SQL.NB_F_CHECK_SUB_SKU(:os_sku,
    :os_from_loc,
    :os_to_loc,
    :os_tsf_no,
    :os_tsfalloc_no,
    :os_create_id,
    to_date(:os_system_date,'YYYYMMDDHH24MISS'),
    L_sub_sku,
    L_avail_stock,
    O_error_message) = FALSE then
    :plsql_pkg_failed := -1;
    :plsql_pkg_message := O_error_message;
    SQL_LIB.BATCH_MSG(:ol_sql_holder,
    L_table,
    :plsql_pkg_message);
    :table := L_table;
    else
    /* Only if ret true and the sub sku, everything its ok */
    if L_sub_sku IS NOT NULL then
    :l_temp_sku := L_sub_sku;
    :plsql_pkg_failed := 0;
    Best Regards,
    JAP

  • Archiso-live with slax support

    I found a way to make archiso scripts work like the old arch-live. By mounting the slax ext2 initrd has root filesystem. The idea is that archiso-live will be like the older arch-live based on slax but will have the archlinux kernel instead of slax kernel.
    I couldn't do this before cause the linux-live scripts would not load right in initramfs with archlinux kernel cause of missing kernel modules that would have been build in kernel with slax kernel.
    I got the system working by making a aufs union with /tmpfs/initrd and /real_root folder. Anyway i think i will share the code for you to understand:
    mount_tmpfs ()
    #if [ "x${ramdisk_size}" = "x" ]; then
    ramdisk_size="25M"
    #fi
    msg -n ":: Mounting tmpfs, size=${ramdisk_size}..."
    mount -t tmpfs -o "size=${ramdisk_size}" tmpfs /tmpfs
    msg "done."
    # args: ext2 file image
    _mnt_ext2_file()
    msg "::: Adding new real_root branch: ${1}"
    /bin/modprobe -q loop max_loop=255 >/dev/null 2>&1
    mkdir -p ${2}
    if ! /bin/losetup "/dev/loop${LOOP_NUM}" ${1} > /dev/null 2>&1; then
    echo "ERROR: Cannot mount loop device /dev/loop${LOOP_NUM}"
    echo " Couldn't mount all addons"
    break
    fi
    /bin/mount -t ext2 "/dev/loop${LOOP_NUM}" ${2}
    export LOOP_NUM=$(( $LOOP_NUM + 1 ))
    run_hook ()
    export LOOP_NUM="0"
    if [ "x${from}" != "x" ]; then
    BOOT_MOUNT="/live"
    fi
    if [ ! $(ls /dev/loop*) ]; then
    echo "Creating loop device nodes."
    mknod /dev/loop0 b 7 0
    mknod /dev/loop1 b 7 1
    mknod /dev/loop2 b 7 2
    mknod /dev/loop3 b 7 3
    mknod /dev/loop4 b 7 4
    fi
    if [ -f "${BOOT_MOUNT}/initrd" ]; then
    mount_tmpfs
    mkdir -p "/tmpfs/initrd"
    _mnt_ext2_file "${BOOT_MOUNT}/initrd" "/tmpfs/initrd"
    /bin/modprobe -q squashfs >/dev/null 2>&1
    /bin/modprobe -q sqlzma >/dev/null 2>&1
    /bin/modprobe -q unlzma >/dev/null 2>&1
    /bin/modprobe -q aufs brs=1 >/dev/null 2>&1
    /bin/mount -t aufs -o nowarn_perm,br:/tmpfs=rw aufs /real_root
    /bin/mount -t aufs -o remount,add:1:/tmpfs/initrd=ro aufs /real_root
    cp -Raf /lib/modules /real_root/lib/modules
    udevpid=$(/bin/minips -C udevd -o pid=)
    [ "x${udevpid}" != "x" ] && /bin/kill -9 $udevpid 2>&1 >/dev/null
    #Yep, we're bailing out here. We don't need kinit.
    msg ":: Passing control to Archlinux Initscripts...Please Wait"
    /bin/umount /sys
    /bin/umount /proc
    exec /bin/run-init -c /dev/console /real_root /sbin/init
    fi
    Right the moment its a ext2 filesystem of initrd on the livecd. I plan on changing it to squashfs so we can save 6mb or so. I copy the kernel modules cause i don't want anything missing even though its mostly has everything the linux-live scripts. Just don't want risk crashing the system with out some module that was build slax but not in archlinux.
    Anyways i hope this helps with the development of archiso.
    EDIT: Fix a typo. tmpfs can only understand M not MB for size.
    Last edited by godane (2009-01-13 19:50:08)

    I have just released the newer archiso-live with slax support.
    http://godane.wordpress.com/2009/01/13/ … 2-release/
    you can get the build scripts here:
    http://github.com/godane/archiso-live/tree/master
    I hope this helps.

  • Re: Beta 1 of Unbreakable Enterprise Kernel Release 3 now available

    Hi there Upgraded Oracle Linux To UeK3 but no sign of dtrace command neither btrfs any tips?
    Thank you in advance

    > dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }'
    Do you have the sdt kernel module loaded?
    > dtrace -n 'syscall:::entry { @num[execname] = count(); }'
    Can you elaborate on what you mean with 'no output'?  Did it display a message saying how many probes matched the probe specification?  Did it provide output when you Ctrl-C the dtrace process?
    > dtrace -n 'sysinfo:::readch { @bytes[execname] = sum(arg0); }'
    The sysinfo provider is not available for Linux yet.  It is not listed as a supported provider in any documentation for DTrace for Linux to my knowledge.
    > dtrace -p 2952
    Userspace tracing is currently limited to USDT probes (i.e. userspace statically defined probed).  The full support for arbitrary probing is in the works.
    Hope this helps,
    Kris

  • Memory Allocated using EXEC SQL VAR in ProC

    For a table that stores resumes, I have a ProC program which outputs LONG column values into a host variable. Here is the table definition:
         create table resume (resume_id number(5),
                   resume_size number(15),
                   resume_text LONG)
    The size of the resume_text can be vary from 0 bytes up to 90K bytes. We use the column "resume_size" to store the size of the resume_text in bytes. Since most of them are smaller than 8K, we don't want to allocate 90K memory for every resume SELECT call. Before we do the SELECT on the resume_text, a host variable pointer is used to allocate memory according to the size of the resume_text:     
         char *resume_buffer;
    len = get_resume_size(id); /* A SELECT statement to fetch the resume_size for this resume from the table */               
         resume_buffer = malloc(len); /* Allocate memory for the resume according to the resume_size. For example, len could be 6000 */
         EXEC SQL VAR resume_buffer IS LONG (100000);      /* without using a constant number will lead to a compiler error */
         EXEC SQL SELECT resume_text INTO :resume_buffer FROM resume WHERE resume_id = :id;
    Is 100000" the size actually allocated in memory (either OS level or Oracle data buffer cache) every time it runs or is it just the maximum possible size needed to satisfy the precompiler?
    Any help greatly appreciated.

    You have to use 'BEGIN procedure_name END' in the execute statement while calling PL/SQL Procedures
    EXEC SQL EXECUTE
    DECLARE
    BEGIN
    END;
    END-EXEC;

  • MSSQL migration bug : EXEC proc param1 OUT

    Hi,
    If you are translating MSSQL stored procedure that calls another which has OUT parameter, remove "OUT" words before translating.
    SQLDeveloper stops translation at this call without warning or error.
    I think its a bug.(How can i reach to bug database of SQLDeveleoperMWB?)
    good luck
    tuna

    Hi Tuna,
    Thanks for this feedback.
    We are currently wrapping up our 10.2.1 release, but I will make sure this issue is resolved first.
    I have logged a bug
    6266209 : OUT PARAMETERS CAUSE THE TRANSLATOR TO FAIL WITH NO WARNINGS OR ERRORS
    I was able to replicate the issue using the following testcase.
    T-SQL
    drop procedure proca
    go
    create procedure proca @param_out int out
    as
    begin
    select @param_out = 10
    end
    go
    drop procedure procb
    go
    create procedure procb
    as
    declare @var_1 int
    begin
    exec proca @var_1 OUT
    select @var_1
    end
    go
    PL/SQL
    CREATE OR REPLACE PROCEDURE procb
    AS
    v_var_1 NUMBER(10,0);
    BEGIN
    BEGIN
    proca(v_var_1);
    END;
    END;
    The missing SELECT statement after the procedure call.
    It looks as if our translator does not recognize the "OUT" keyword correctly.
    This will be fixed ASAP. Ill keep you updated.
    Regards,
    Dermot.

Maybe you are looking for