Issue with a Procedure

declare
-- Local variables here
i integer;
begin
-- new_pack.set_value(false);
new_pack.get_value;
end;
In the above code, The procedure returns the last passed set value  even when i comment the setvalue procedure and retrieve the value from get
_value.
But if i execute it in a new session, It gives me the default value , i have set.
Why is it so? and What should be done to retrieve the default value in all the sessions?
Below is the created package.
create or replace package body New_pack is
procedure get_value is
begin
if cond then
dbms_output.put_line('Value is true');
else
dbms_output.put_line('Value is false');
end if;
end;
procedure set_value(dat boolean ) is
begin
cond := dat;
end;
end New_pack;

PL/SQL is a very poor place to do things "globally" across sessions. To do this properly one needs to use shared memory of sorts, semaphores and mutexes to manage read/write access to the global data, etc.
Why do all this when you can use what Oracle uses for this.. SQL tables. It supports concurrent access. It supports row-level locking. It has ACID properties. Etc.
Do not reinvent the SQL wheel in PL/SQL.

Similar Messages

  • Issue with calling procedure remotely

    Hello,
    Within the stored procedure, I am calling a procedure remotely but the '@v_remote_db' variable does not resolve:
    begin
    for i in cur_database_list loop
    v_remote_db := i.database_name;
    p_trunc_remote_table@v_remote_db; <<<------does not resolve
    end loop;
    end;
    Would work if obsolute value:
    p_trunc_remote_table@dev_db <------"works because dev_db is an actually database name and not a variable."
    The database link is correctly defined and works.
    Question: How to go around using obsolute value? I need to use a variable because the variable v__remote_db resolves to about 50 databases. Thank you.

    Duplicate thread:
    Re: issue with remote procedure calls
    Amiel

  • DateTime parameter issue with Stored Procedure CR XI

    Hello everyone.
    This error was touched on here previously but no answer provided.
    I am using Crystal Reports XI with SAP's BUSINESS ONE product. I have a report using a SQL Stored Procedure (SQL 2005). It has datetime parameters.
    The Stored Procedure (SP) works fine when executed from within the Management studio. I then created my report, connecting to the SP with an ODBC driver and all was great.
    But the add on being used for the report to be included in B1 requires OLE connectivity. No problem, all my reports (none of the others have SP's though), work fine with OLE.
    So I tried redirecting the report to use the OLE driver. But I get an error.
    I tried creating a new report with the SP using the OLE driver. Same message.
    I get the following:
    Query Engine Error: 'ADO Error Code: 0x80040e14
    Source: Microsoft SQL Native Client
    Description: Incorrect syntax near the keyword 'CONVERT'.
    SQL State: 42000
    Native Error: 156'
    My code does not include the word CONVERT anywhere.
    From what I can find on the web, this is supposedly an issue with the datetime parameter.  But despite a few people posting messages about this, I have yet to find the answer. None of the topics have had a reply that provides the fix.
    It seems to be something specific to OLE, since it works fine in ODBC. I am using SQL NATIVE CLIENT.
    Thanks in advance for any help.
    Mark

    Hi Alex. Thanks.
    One of my colleagues actually suggested a similar thing. He pointed out I should be using the MICROSOFT OLE DB PROVIDER FOR SQL SERVER (I had been doing so but somewhere along the line started using the Native driver).
    And yes, that worked like a charm.
    Thanks for your help.
    Mark

  • Issue with Stored procedure

    Hi,
    I am trying to create a stored procedure and am trying to execute it in 2 different ways.. One works and the other throws a syntax error.
    Can you please explain why the first one has issues and the second one works fine? Also please suggest what the correction in first one should be.

    Hi Sammy,
    You cannot compare with Table Variable in your WHERE Clause, instead you have to use SCALAR Variable
    As Justin rightly mentioned you should SCALAR Variable.
    DECLARE var1 INTEGER;
    SELECT YEAR(CURRENT_DATE) INTO var1 FROM DUMMY;
    YEAR1 = select "YEAR","HIKE" from HIKE_YEAR
    WHERE YEAR = :var1;
    Regards,
    Krishna Tangudu

  • Issue with a procedure and IN operator...

    Hi,
    Data
    Service_Request_id function_activity_ids
    102092     2     2 -- Query works fine as v_function_activity_ids(i) = 22
    102094 24,25,29 -- Query does not work and returns null as v_function_activity_ids(i) =24,25,29 is passed.
    102152 23,24 -- Query does not work and returns null as v_function_activity_ids(i) =23,22 is passed.
    CURSOR c_service_request_null IS
    SELECT service_request_id,function_activity_ids,service_region_id      
           FROM temp_sop_service_request
           WHERE function_activity_ids IS NOT NULL AND SERVICE_REQUEST_ID IN ( '102092','102094','102152');
    <all the relevant vars. declared here...>
    begin
    OPEN c_service_request_null;
      LOOP
        FETCH c_service_request_null
        BULK COLLECT INTO v_service_req_id,v_platform_type,v_service_country,v_service_state,
                          v_function_activity_ids,v_service_region_id
        LIMIT 500;
        EXIT WHEN v_row_count = c_service_request_null%ROWCOUNT;
        v_row_count := c_service_request_null%ROWCOUNT;
    FOR i IN 1..v_service_req_id.count LOOP
            SELECT  max(decode(upper(trim(region_id)),NULL,'UR',upper(trim(region_id))))
            INTO v_region_id(i)
            FROM SOP_REGION_ACTIVITY_MAP
         WHERE
         (UPPER(TRIM(ACTIVITY_NAME)), UPPER(TRIM(SUB_ACTIVITY_NAME))) IN
                   (SELECT UPPER(TRIM(ACTIVITY_NAME)), UPPER(TRIM(SUB_ACTIVITY_NAME))
                      FROM SOP_FUNCTION_ACTIVITY_MAP
                     WHERE TRIM(FUNCTION_ACTIVITY_ID) IN (TRIM(v_function_activity_ids(i)))); --> Problem Here
    END LOOP;
    END;Now, when variable v_function_activity_ids(i) contains string 24,25,29 the above query does not give anything..i.e. it does not find the match and hence v_region_id(i) is returned as null.
    But when request contains function_activity_ids as single i.e. 25 it works and v_region_id(i) is returned correctly.
    Also, If I hardcode the value as under then it works :
      SELECT  max(decode(upper(trim(region_id)),NULL,'UR',upper(trim(region_id))))
            INTO v_region_id(i)
            FROM SOP_REGION_ACTIVITY_MAP
         WHERE
         (UPPER(TRIM(ACTIVITY_NAME)), UPPER(TRIM(SUB_ACTIVITY_NAME))) IN
                   (SELECT UPPER(TRIM(ACTIVITY_NAME)), UPPER(TRIM(SUB_ACTIVITY_NAME))
                      FROM SOP_FUNCTION_ACTIVITY_MAP
                     WHERE TRIM(FUNCTION_ACTIVITY_ID) IN (TRIM(24,25,29)));Can you pls help me with this..
    Thx..

    Looks like You totally misunderstand the IN() clause.
    In your scenario resulting query looks like
    ... in ( '24,25,29' ) - that's why You will never get result if two or more values comes from function.
    Two solutions:
    1) You can put values in the temporary table or table pl/sql and rewrite query appropriate way:
    ... in (select value from my_temp_table)
    ... in (select value from table(my_plsql_table))
    2) While using 10g, You can format regexp pattern instead of 'val1,val2,val3' and use
    ... regexp_like(FUNCTION_ACTIVITY_ID, PATTERN)
    regexp docs: http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14200/conditions007.htm#SQLRF00501

  • Issue with remote procedure calls

    Hello,
    Within the stored procedure, I am calling a procedure remotely but the '@v_remote_db' variable does not resolve:
    begin
    for i in cur_database_list loop
    v_remote_db := i.database_name;
    p_trunc_remote_table@v_remote_db; <<<------does not resolve
    end loop;
    end;
    Would work if obsolute value:
    p_trunc_remote_table@dev_db <------"works because dev_db is an actually database name and not a variable."
    The database link is correctly defined and works.
    Question: How to go around using obsolute value? I need to use a variable because the variable v__remote_db resolves to about 50 databases. Thank you.

    use dynamic sql:
    execute immediate
    or
    dbms_sql
    Amiel

  • PL-SQL procedure to fix Recycle Algorithm issues with Advanced Outbound

    Dear all,
    A customer is using Oracle Advanced Outbound 11.5.9. and we have an issue with recycle Algorithm.
    The issue is that for some cases we get outcome 32, 37 which is cache expired in table iec_g_return_entries and not the original outcome that agent has entered.
    Fortunately the original outcome exists in table jtf_ih_interactions so we have created a workaround in PL-SQL to update table iec_g_return_entries from jtf_ih_interactions using some common outcomes.
    Now after a long time the issue still exists and the customer want this workaround to be optimized, so that it takes all the values from recycle algorithm tables and not just the common outcomes and conditions.
    As I can see, there are so many condition in the algorithms and it is quite hard to catch all the conditions and create an PL-SQL procedure to update the iec_g_return_tables.
    Has anyone done something similar?
    Thanks a lot,
    Christos

    Dear all,
    A customer is using Oracle Advanced Outbound 11.5.9. and we have an issue with recycle Algorithm.
    The issue is that for some cases we get outcome 32, 37 which is cache expired in table iec_g_return_entries and not the original outcome that agent has entered.
    Fortunately the original outcome exists in table jtf_ih_interactions so we have created a workaround in PL-SQL to update table iec_g_return_entries from jtf_ih_interactions using some common outcomes.
    Now after a long time the issue still exists and the customer want this workaround to be optimized, so that it takes all the values from recycle algorithm tables and not just the common outcomes and conditions.
    As I can see, there are so many condition in the algorithms and it is quite hard to catch all the conditions and create an PL-SQL procedure to update the iec_g_return_tables.
    Has anyone done something similar?
    Thanks a lot,
    Christos

  • Issue with Executing OS commands from Stored Procedure

    I am trying to execute the scripts provided at :
    http://github.com/xtender/XT_SHELL
    provided by xtender user.
    As required, I have asked my DBAs to grant privileges by executing the following scripts:
    Begin
      --change to needed permissions and execute
      dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/factiva/ODS/bin/CVIM_Rpt_ExportCSVFile’, 'read,write,execute' );
    end;
    /where CVIM_Rpt_ExportCSVFile is my script residing in the Unix server where my Oracle is installed.
    The error I am facing when I try to execute the following command is:
    select * from table(xt_shell.shell_exec('/var/scripts/CVIM_Rpt_ExportCSVFile',100))
    Exception:the Permission (java.io.FilePermission /var/scripts/CVIM_Rpt_ExportCSVFile execute) has not been granted to ODS. The PL/SQL to grant this is dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )I have asked my DBA to also execute the following scripts: - But I still see the same error as above. I am not able to figure out whats going on. Can anyone pls help me out??
    EXEC Dbms_Java.Grant_Permission('ODS', 'SYS:java.lang.RuntimePermission', 'writeFileDescriptor', '');
    EXEC Dbms_Java.Grant_Permission(ODS', 'SYS:java.lang.RuntimePermission', 'readFileDescriptor', '');
    dbms_java.grant_permission( 'ODS', 'SYS:java.io.FilePermission', '/var/scripts/CVIM_Rpt_ExportCSVFile', 'execute' )

    DUPLICATE
    ===============================================================
    Issue with Executing OS commands from Stored Procedure
    ==============================================================

  • Issues with procedures on ODI 11g

    Hello Gurus,
    We have an ODI environment, where we have migrated from ODI 10g to ODI 11g (11.1.1.6) using Upgrade Assistant.
    Issue is that, the Procedures in our migrated packages show executed in Operator (by Green tickmark), but they are actually NOT executing the code. Means we are not able to see Code for the procedure steps, when that step is opened from operator. It does not even show Rows updated or other statistics. It shows 0 for all.
    We do not see any error in ODI studio for those steps. Thats why unable to figure out whats happening.
    Note: There is no issue with the SQL code. Its been tested on SQL Server.
    What could be cause behind this ?
    Please help.
    Thanks,
    Santy

    The issue here is that there is Always Execute option which belongs to each procedure. It must be enabled/checked(need to check manually going through each procedure) in order to have the procedure run after migration to 11g. This was not mandatory in 10g & unfortunately, Upgrade Assistant does not take care on this.
    Regards,
    Santy

  • Issues with WIFI-connection in the Spotify app

    I have a very annoying problem with my Nokia 5800 XM and the Spotify-app. I updated the app to v. 0.4.3.9 yesterday and it required that I uninstalled the old version first, i.e deleting all my cached tracks. Now today when I'm going to resync (on WLAN, since it's about 500 tracks) it just won't connect. I choose the correct WLAN from the list, but the app continues being blue (not green) and then the list pops up again. I read another discussion about almost the same thing a moment ago, so I tried to go to the menu and check the WLAN connection from its menu. So I did that, and it says my WLAN has full signal strength (I'm right next to the router) but then it loses the connection and asks me again which network I want to use. I have not had any issues with WLAN in any other app, and I have synced tracks with Spotify on my WLAN before, so I have no idea where the problem lies. Maybe something with the update and my WLAN? I don't know...
    About the attachments: The list that shows several times and then the WLAN list where I'm connected to my network and it has full strength. "Marsvinsfarmen" is my network.
    I'm thankful for answer, I use Spotify every day!
    Solved!
    Go to Solution.
    Attachments:
    Scr000012.jpg ‏51 KB
    Scr000013.jpg ‏54 KB
    Scr000014.jpg ‏50 KB

    Okay everyone! I struggled with this problem for a long time, and I was just about to send a complaint to Spotify when it worked for me! See, I did a little different than before; this is the list I was going to file:
    "1. I open Spotify from the application menu.
    2. I choose "Online" mode.
    3. My phone asks me how I want to connect to the Internet.
    4. I pick "Easy WiFi".
    5. I choose my WiFi network from the list.
    6. Application seems to be signing me in.
    7. My phone asks me again how I want to connect to the Internet.
    8. I repeat the procedure. Spotify can't connect with WiFi.
     -I have tried to connect using other WiFi networks, didn't work.
     -Before I updated last time I could connect without problem.
     -I can connect using 3G.
     -I can connect using WiFi in other applications than Spotify, for example Opera Mobile and the native browser.
     -I have reinstalled the application without difference."
    However, I did it a little different, which made it work: instead of choosing "Easy WiFi", I choose my network directly from the list: see attachment. I never thought of that I could do so and I can't remember I did that before the update either. I have now synced my tracks and the app seems to be a little buggy, I still hope for an update, though it now works at least. Sometimes it crashes.
    Please, tell me about if this worked for you and if you have other, better solutions. This isn't good enough, I still seek a better way.
    /L
    Attachments:
    Scr000020.jpg ‏53 KB

  • Connection issues with EA4500

    I had bad connection issues with my mobile device, so i pressed reset on my EA4500 router, and now when i connect to my network, it gives my limited connection even though i have 5 bars of signal. Not sure what to do now...

    Resetting the router will erase all the settings you configured on the router since the initial setup. You manually configure the router's wireless settings so your wireless devices can have internet access again.
    Procedure: http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=cfb50c0dc992443ab2405a782cca60f7_19073.xml&pid=80&...
    Make sure to use a computer that is hardwired via Ethernet cable to the router.
    For bad connection issues: http://kb.linksys.com/Linksys/ukp.aspx?vw=1&docid=cf6ed888ce144d06905af4987887fd1b_KBxxxx_EN_v1.xml&...

  • Performance issues with dynamic action (PL/SQL)

    Hi!
    I'm having perfomance issues with a dynamic action that is triggered on a button click.
    I have 5 drop down lists to select columns which the users want to filter, 5 drop down lists to select an operation and 5 boxes to input values.
    After that, there is a filter button that just submits the page based on the selected filters.
    This part works fine, the data is filtered almost instantaneously.
    After this, I have 3 column selectors and 3 boxes where users put values they wish to update the filtered rows to,
    There is an update button that calls the dynamic action (procedure that is written below).
    It should be straight out, the only performance issue could be the decode section, because I need to cover cases when user wants to set a value to null (@) and when he doesn't want update 3 columns, but less (he leaves '').
    Hence P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||')
    However when I finally click the update button, my browser freezes and nothing happens on the table.
    Can anyone help me solve this and improve the speed of the update?
    Regards,
    Ivan
    P.S. The code for the procedure is below:
    create or replace
    PROCEDURE DWP.PROC_UPD
    (P99_X_UC1 in VARCHAR2,
    P99_X_UV1 in VARCHAR2,
    P99_X_UC2 in VARCHAR2,
    P99_X_UV2 in VARCHAR2,
    P99_X_UC3 in VARCHAR2,
    P99_X_UV3 in VARCHAR2,
    P99_X_COL in VARCHAR2,
    P99_X_O in VARCHAR2,
    P99_X_V in VARCHAR2,
    P99_X_COL2 in VARCHAR2,
    P99_X_O2 in VARCHAR2,
    P99_X_V2 in VARCHAR2,
    P99_X_COL3 in VARCHAR2,
    P99_X_O3 in VARCHAR2,
    P99_X_V3 in VARCHAR2,
    P99_X_COL4 in VARCHAR2,
    P99_X_O4 in VARCHAR2,
    P99_X_V4 in VARCHAR2,
    P99_X_COL5 in VARCHAR2,
    P99_X_O5 in VARCHAR2,
    P99_X_V5 in VARCHAR2,
    P99_X_CD in VARCHAR2,
    P99_X_VD in VARCHAR2
    ) IS
    l_sql_stmt varchar2(32600);
    p_table_name varchar2(30) := 'DWP.IZV_SLOG_DET'; 
    BEGIN
    l_sql_stmt := 'update ' || p_table_name || ' set '
    || P99_X_UC1 || ' = decode('  || P99_X_UV1 ||','''','|| P99_X_UC1  ||',''@'',null,'|| P99_X_UV1  ||'),'
    || P99_X_UC2 || ' = decode('  || P99_X_UV2 ||','''','|| P99_X_UC2  ||',''@'',null,'|| P99_X_UV2  ||'),'
    || P99_X_UC3 || ' = decode('  || P99_X_UV3 ||','''','|| P99_X_UC3  ||',''@'',null,'|| P99_X_UV3  ||') where '||
    P99_X_COL  ||' '|| P99_X_O  ||' ' || P99_X_V  || ' and ' ||
    P99_X_COL2 ||' '|| P99_X_O2 ||' ' || P99_X_V2 || ' and ' ||
    P99_X_COL3 ||' '|| P99_X_O3 ||' ' || P99_X_V3 || ' and ' ||
    P99_X_COL4 ||' '|| P99_X_O4 ||' ' || P99_X_V4 || ' and ' ||
    P99_X_COL5 ||' '|| P99_X_O5 ||' ' || P99_X_V5 || ' and ' ||
    P99_X_CD   ||       ' = '         || P99_X_VD ;
    --dbms_output.put_line(l_sql_stmt); 
    EXECUTE IMMEDIATE l_sql_stmt;
    END;

    Hi Ivan,
    I do not think that the decode is performance relevant. Maybe the update hangs because some other transaction has uncommitted changes to one of the affected rows or the where clause is not selective enough and needs to update a huge amount of records.
    Besides that - and I might be wrong, because I only know some part of your app - the code here looks like you have a huge sql injection vulnerability here. Maybe you should consider re-writing your logic in static sql. If that is not possible, you should make sure that the user input only contains allowed values, e.g. by white-listing P99_X_On (i.e. make sure they only contain known values like '=', '<', ...), and by using dbms_assert.enquote_name/enquote_literal on the other P99_X_nnn parameters.
    Regards,
    Christian

  • Performance issues with pipelined table functions

    I am testing pipelined table functions to be able to re-use the <font face="courier">base_query</font> function. Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? The <font face="courier">processor</font> function is from [url http://www.oracle-developer.net/display.php?id=429]improving performance with pipelined table functions .
    Edit: The underlying query returns 500,000 rows in about 3 minutes. So there are are no performance issues with the query itself.
    Many thanks in advance.
    CREATE OR REPLACE PACKAGE pipeline_example
    IS
       TYPE resultset_typ IS REF CURSOR;
       TYPE row_typ IS RECORD (colC VARCHAR2(200), colD VARCHAR2(200), colE VARCHAR2(200));
       TYPE table_typ IS TABLE OF row_typ;
       FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
          RETURN resultset_typ;
       c_default_limit   CONSTANT PLS_INTEGER := 100;  
       FUNCTION processor (
          p_source_data   IN resultset_typ,
          p_limit_size    IN PLS_INTEGER DEFAULT c_default_limit)
          RETURN table_typ
          PIPELINED
          PARALLEL_ENABLE(PARTITION p_source_data BY ANY);
       PROCEDURE with_pipeline (argA          IN     VARCHAR2,
                                argB          IN     VARCHAR2,
                                o_resultset      OUT resultset_typ);
       PROCEDURE no_pipeline (argA          IN     VARCHAR2,
                              argB          IN     VARCHAR2,
                              o_resultset      OUT resultset_typ);
    END pipeline_example;
    CREATE OR REPLACE PACKAGE BODY pipeline_example
    IS
       FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
          RETURN resultset_typ
       IS
          o_resultset   resultset_typ;
       BEGIN
          OPEN o_resultset FOR
             SELECT colC, colD, colE
               FROM some_table
              WHERE colA = ArgA AND colB = argB;
          RETURN o_resultset;
       END base_query;
       FUNCTION processor (
          p_source_data   IN resultset_typ,
          p_limit_size    IN PLS_INTEGER DEFAULT c_default_limit)
          RETURN table_typ
          PIPELINED
          PARALLEL_ENABLE(PARTITION p_source_data BY ANY)
       IS
          aa_source_data   table_typ;-- := table_typ ();
       BEGIN
          LOOP
             FETCH p_source_data
             BULK COLLECT INTO aa_source_data
             LIMIT p_limit_size;
             EXIT WHEN aa_source_data.COUNT = 0;
             /* Process the batch of (p_limit_size) records... */
             FOR i IN 1 .. aa_source_data.COUNT
             LOOP
                PIPE ROW (aa_source_data (i));
             END LOOP;
          END LOOP;
          CLOSE p_source_data;
          RETURN;
       END processor;
       PROCEDURE with_pipeline (argA          IN     VARCHAR2,
                                argB          IN     VARCHAR2,
                                o_resultset      OUT resultset_typ)
       IS
       BEGIN
          OPEN o_resultset FOR
               SELECT /*+ PARALLEL(t, 5) */ colC,
                      SUM (CASE WHEN colD > colE AND colE != '0' THEN colD / ColE END)de,
                      SUM (CASE WHEN colE > colD AND colD != '0' THEN colE / ColD END)ed,
                      SUM (CASE WHEN colD = colE AND colD != '0' THEN '1' END) de_one,
                      SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
                 FROM TABLE (processor (base_query (argA, argB),100)) t
             GROUP BY colC
             ORDER BY colC
       END with_pipeline;
       PROCEDURE no_pipeline (argA          IN     VARCHAR2,
                              argB          IN     VARCHAR2,
                              o_resultset      OUT resultset_typ)
       IS
       BEGIN
          OPEN o_resultset FOR
               SELECT colC,
                      SUM (CASE WHEN colD > colE AND colE  != '0' THEN colD / ColE END)de,
                      SUM (CASE WHEN colE > colD AND colD  != '0' THEN colE / ColD END)ed,
                      SUM (CASE WHEN colD = colE AND colD  != '0' THEN 1 END) de_one,
                      SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
                 FROM (SELECT colC, colD, colE
                         FROM some_table
                        WHERE colA = ArgA AND colB = argB)
             GROUP BY colC
             ORDER BY colC;
       END no_pipeline;
    END pipeline_example;
    ALTER PACKAGE pipeline_example COMPILE;Edited by: Earthlink on Nov 14, 2010 9:47 AM
    Edited by: Earthlink on Nov 14, 2010 11:31 AM
    Edited by: Earthlink on Nov 14, 2010 11:32 AM
    Edited by: Earthlink on Nov 20, 2010 12:04 PM
    Edited by: Earthlink on Nov 20, 2010 12:54 PM

    Earthlink wrote:
    Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? Well, we're missing a lot here.
    Like:
    - a database version
    - how did you test
    - what data do you have, how is it distributed, indexed
    and so on.
    If you want to find out what's going on then use a TRACE with wait events.
    All nessecary steps are explained in these threads:
    HOW TO: Post a SQL statement tuning request - template posting
    http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
    Another nice one is RUNSTATS:
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551378329289980701

  • Performance issues with Oracle EE 9.2.0.4 and RedHat 2.1

    Hello,
    I am having some serious performance issues with Oracle Enterprise Edition 9.2.0.4 and RedHat Linux 2.1. The processor goes berserk at 100% for long (some 5 min.) periods of time, and all the ram memory gets used.
    Some environment characteristics:
    Machine: Intel Pentium IV 2.0GHz with 1GB of RAM.
    OS: RedHat Linux 2.1 Enterprise.
    Oracle: Oracle Enterprise Edition 9.2.0.4
    Application: We have a small web-application with 10 users (for now) and very basic queries (all in stored procedures). Also we use the latest version of ODP.NET with default connection settings (some low pooling, etc).
    Does anyone know what could be going on?
    Is anybody else having this similar behavior?
    We change from SQL-Server so we are not the world expert on the matter. But we want a reliable system nonetheless.
    Please help us out, gives some tips, tricks, or guides…
    Thanks to all,
    Frank

    Thank you very much and sorry I couldn’t write sooner. It seems that the administrator doesn’t see the kswap going on so much, so I don’t really know what is going on.
    We are looking at some queries and some indexing but this is nuts, if I had some poor queries, which we don’t really, the server would show pick right?
    But he goes crazy and has two oracle processes taking all the resources. There seems to be little swapping going on.
    Son now what? They are all ready talking about MS-SQL please help me out here, this is crazy!!!
    We have, may be the most powerful combinations here. What is oracle doing?
    We even kill the Working Process of the IIS and have no one do anything with the database and still dose two processes going on.
    Can some one help me?
    Thanks,
    Frank

  • Issue with Insert in SP

    Gurus,
    I have an issue with inserting rows into temp table through SP.
    Here is my proc. its running fine. After the execution completed when i try to select the rows from srini_temp table its showing 0 rows. Whats wrong here.
    CREATE PROCEDURE BO_HR_RPT.SRINI_TEST AS
    BEGIN
    insert into BO_HR_RPT.srini_temp (
    COURSE_TITLE,
    COURSE_ID,
    CLASS_NO,
    DELIVERY_METHOD,
    LEARNER_OWN,
    DURATION,
    score,
    VENDOR,
    START_DATE,
    END_DATE,
    INSTRUCTOR_NAME,
    TRANS_STATUS,
    LEARNER_NAME,
    LEARNER_EMP_TYPE,
    INSTRUCTOR_OWN,
    INSTRUCTOR_EMP_TYPE,
    EFFT_PERIOD,
    YEAR,
    AS_OF_DATE,
    LMS_SOURCE,
    REPORT_CATEGORY)
    SELECT COURSE_TITLE,
    COURSE_ID,
    CLASS_NO,
    CASE WHEN COURSE_ID LIKE 'TIS%' OR COURSE_ID LIKE 'TIWEB%' OR COURSE_ID LIKE 'TIVLAB%' OR COURSE_ID LIKE 'TIWVT%'
    OR COURSE_ID LIKE 'STARELT%' OR COURSE_ID LIKE 'TIELT%' OR DELIVERY_METHOD ='Web Based Training'
    OR DELIVERY_METHOD = 'e-Learning or via backend Import' THEN 'E-Learning'
    WHEN DELIVERY_METHOD = 'IDL' THEN 'IDL'
    WHEN DELIVERY_METHOD = 'IDL Replay' THEN 'Replay'
    ELSE INITCAP(DELIVERY_METHOD) END AS DELIVERY_METHOD,
    RTRIM(LEARNER_OWN) as LEARNER_OWN,
    CASE WHEN LMS_SOURCE ='SABA' THEN ROUND(DURATION/60,1)
    ELSE DURATION END AS DURATION,
    CASE WHEN SCORE='0' then '' else score END as score,
    CASE WHEN (vendor_name IS NOT NULL) AND (UPPER(SUBSTR(COURSE_ID,1,2)) = 'TV') then vendor_name
    WHEN COURSE_ID LIKE 'TIWEB%' then 'SKILLSOFT'
    WHEN COURSE_ID LIKE 'TIVLAB%' then 'ELEMENTK'
    ELSE 'N' END AS VENDOR,
    START_DATE,
    END_DATE,
    INITCAP(INSTRUCTOR_NAME) AS INSTRUCTOR_NAME,
    TRANS_STATUS,
    INITCAP(LEARNER_NAME) AS LEARNER_NAME,
    INITCAP(LEARNER_EMP_TYPE) AS LEARNER_EMP_TYPE,
    RTRIM(INSTRUCTOR_OWN),
    INITCAP(INSTRUCTOR_EMP_TYPE) AS INSTRUCTOR_EMP_TYPE,
    trim(initcap(TO_CHAR(TRUNC(NVL(END_DATE,START_DATE)),'MONTH'))) AS EFFT_PERIOD,
    TO_CHAR(TRUNC(NVL(END_DATE,START_DATE)),'YYYY') AS YEAR,
    TRUNC(ADD_MONTHS(LAST_DAY(load_date) ,-1)) AS AS_OF_DATE,
    LMS_SOURCE,
    REPORT_CATEGORY
    FROM BO_HR_RPT.ELM_GLD_MASTER_BASE
    where ROWNUM <= 10
    ORDER BY COURSE_ID,CLASS_NO,START_DATE,END_DATE,INSTRUCTOR_NAME;
    COMMIT;
    END;
    Thanks for great help.
    Srini

    Are you completely sure this isn't a global temporary table?
    it really would explain your problems!
    Have you got access to run a
    select tablename from all_tables where TEMPORARY = 'Y'[pre]                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Problem with opening two frame by single hyperlink

    HI to everyone, I making a project , in that i want if i click on a particular hyperlink. then it open two Different frame which is showing different content . one is in the same page in which is h yperlink is appearing pelink (means in the same fram

  • Import bitmap into an array

    I want to import a 24-bit bitmap image into an array so I can loop through the array and perform calculations based on the color of the pixels etc. Can any one advise me of an easy way to do this in Java? Thanks

  • How can i change the exposition time of all the pictures at the same time, not one by one?

    I want to change the time of lenght of all the pictures but at the sime time, not 1 by 1, Is it possible? Thanks

  • Auto Tag Cleaner Cras

    Does anybody know how to stop the auto tag cleaner from crashing? thanx

  • IChat & New BT Home Hub

    Had the old white BT Home Hub and iChat was working fine but I have just received the newer faster better hub and I get the following message :- Date/Time: 2008-12-15 17:19:28.344 +0000 OS Version: 10.5.5 (Build 9F33) Report Version: 4 iChat Connecti