Regarding  Plsql tunning

Hello
Already One function had in database now days it takes more time to execute
Please guide me how i tunning this code
Please check my code
I have check all code and indexces they are exactly pick up
FUNCTION balances (p_set_of_books_id IN NUMBER,
p_period_name IN VARCHAR2,
p_business_id IN VARCHAR2,
p_partition_key IN VARCHAR2)
RETURN NUMBER IS
---Cursor to select the period passed as paramete and last six periods.
CURSOR c_periods(p_period_name VARCHAR2) IS
SELECT period_name
FROM gl.gl_periods
WHERE period_set_name = 'GE_CALENDAR'
AND start_date <=
(SELECT start_date
FROM gl.gl_periods
WHERE period_set_name = 'GE_CALENDAR'
AND period_name = p_period_name)
AND end_date >= (SELECT end_date - 190
FROM gl.gl_periods
WHERE period_set_name = 'GE_CALENDAR'
AND period_name = p_period_name)
AND period_name NOT LIKE 'ADJ%';
-- Local variables --
v_error_code NUMBER := 1;
lv_count NUMBER := 0;
lv_tot_count NUMBER := 0;
lv_sub_pl VARCHAR2(25) := '';
lv_management_str VARCHAR2(25) := '';
tlm_rec_count number :=0 ;
gbal_rec_count number :=0 ;
gbal_any_run number :=0 ;
load_data varchar2(1) := 'Y';
BEGIN
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'starting insert into glc_smart_stream_bal_extract');
DELETE FROM XXCUSTOM.GLC_SMART_STREAM_BAL_EXTRACT
WHERE BUSINESS_CODE = P_BUSINESS_ID
AND PERIOD_NAME NOT IN
(SELECT period_name
FROM gl.gl_periods
WHERE period_set_name = 'GE_CALENDAR'
AND start_date <=
(SELECT start_date
FROM gl.gl_periods
WHERE period_set_name = 'GE_CALENDAR'
AND period_name = p_period_name)
AND end_date >=
(SELECT end_date - 190
FROM gl.gl_periods
WHERE period_set_name = 'GE_CALENDAR'
AND period_name = p_period_name)
AND period_name NOT LIKE 'ADJ%');
COMMIT;
FOR rec_periods IN c_periods(p_period_name)
LOOP
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'inserting records for period - ' ||
rec_periods.period_name);
tlm_rec_count := 0;
gbal_rec_count := 0;
gbal_any_run :=0 ;
load_data := 'N';
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'processing period ' || rec_periods.period_name||
'Started ' || to_char(sysdate,'dd-mon-rr hh24:mi:ss'));
BEGIN
-- Look if any record exist in the table for this Business and this period
SELECT COUNT(1)
INTO TLM_REC_COUNT
FROM XXCUSTOM.GLC_SMART_STREAM_BAL_EXTRACT
WHERE PERIOD_NAME = REC_PERIODS.PERIOD_NAME
AND BUSINESS_CODE = P_BUSINESS_ID;
EXCEPTION
WHEN OTHERS THEN
TLM_REC_COUNT := 0; -- FORCE PROCESSING
END;
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'tlm_rec_count for ' || rec_periods.period_name || ' - ' || tlm_rec_count||
'Started ' || to_char(sysdate,'dd-mon-rr hh24:mi:ss'));
if tlm_rec_count > 0 then -------There are more than 0 records in the table
begin
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'Starting to count gbal ' || to_char(sysdate,'dd-mon-rr hh24:mi:ss'));
select count(1) ----Selecting count of records in gl_balances table for which last update date is after this program was last run.
into gbal_rec_count
from gl.gl_balances
where period_name = rec_periods.period_name and
set_of_books_id = p_set_of_books_id and
last_update_date > (select last_run_time
from XXCUSTOM.glc_smart_stream_bal_ext_run
where business_code = p_business_id
-- and period_name=rec_periods.period_name
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'FOUND gbal_rec_count for ' || rec_periods.period_name || ' - ' || p_business_id || '- ' || gbal_rec_count||
'Started ' || to_char(sysdate,'dd-mon-rr hh24:mi:ss'));
EXCEPTION
WHEN OTHERS THEN
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'NOT FOUND gbal_rec_count for ' || rec_periods.period_name || ' - ' || p_business_id || '- ' || gbal_rec_count||
'Started ' || to_char(sysdate,'dd-mon-rr hh24:mi:ss'));
gbal_rec_count := 1; -- force reload of data
end;
if gbal_rec_count > 0 then --if there has been update in gl_balance table afte last_run_date then load data
load_data := 'Y';
end if;
else ---There are no records in the table , hence load
load_data := 'Y';
end if;
if load_data = 'Y' then ---Loading data as upload status set to Yes
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'loading data for ' || rec_periods.period_name||
'Started ' || to_char(sysdate,'dd-mon-rr hh24:mi:ss'));
Begin
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'deleting data ' || rec_periods.period_name||
'Started ' || to_char(sysdate,'dd-mon-rr hh24:mi:ss'));
delete from xxcustom.glc_smart_stream_bal_extract
where business_code = p_business_id and
period_name = rec_periods.period_name; --Deleting data from Table for this business and this period
commit;
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'deleted data ' || rec_periods.period_name||
'Ended ' || to_char(sysdate,'dd-mon-rr hh24:mi:ss'));
End;
--Inserting Records Into Table
INSERT INTO xxcustom.glc_smart_stream_bal_extract
(business_code,
period_name,
period_num,
period_year,
SET_OF_BOOKS_ID ,
SET_OF_BOOKS_NAME ,
ble,
bsla,
corp_code,
bus_code,
account,
cdr3,
loan_number,
account_flexfield,
currency,
rpt_end_balance,
center,
analysis,
other,
orig_end_balance,
orig_period_net_cr,
orig_period_net_dr,
account_description,
centre_deal_id,
functional_currency,
account_type,
sub_account,
analysis_desc,
cost_center_desc,
gaap_ind,
management_structure,
sub_pl,
cdr6,
cdr9,
code_combination_id,
rpt_open_balance,
orig_open_bal,
rpt_net_dr,
rpt_net_cr)
SELECT /* + INDEX(fvals1 FND_FLEX_VALUES_N1) INDEX(fvals2 FND_FLEX_VALUES_N1)
INDEX(fvals3 FND_FLEX_VALUES_N1) INDEX(fvals4 FND_FLEX_VALUES_N1)
INDEX(fvals5 FND_FLEX_VALUES_N1)*/
p_business_id business_code,
bal.period_name period_name,
bal.period_num period_num,
bal.period_year period_year,
gsob.set_of_books_id,
gsob.name,
gcc.segment1 ble,
fvals4.attribute4 bsla,
fvals4.attribute3 corp_code,
SUBSTR(gcc.segment1, 4, 3) bus_code,
gcc.segment3 ACCOUNT,
SUBSTR(gcc.segment3, 1, 3) cdr3,
fvals1.attribute2 loan_number,
segment1 || '.' || segment2 || '.' || segment3 || '.' ||
segment4 || '.' || segment5 account_flexfield,
bal.currency_code currency,
DECODE(bal.currency_code,
'USR',
0,
(BEGIN_BALANCE_DR_BEQ - BEGIN_BALANCE_CR_BEQ) + (PERIOD_NET_DR_BEQ - PERIOD_NET_CR_BEQ)) rpt_end_balance,
gcc.segment2 center,
gcc.segment4 analysis,
gcc.segment5 other,
DECODE(bal.currency_code,
'USR',
0,
(bal.begin_balance_dr - bal.begin_balance_cr) +
(bal.period_net_dr - period_net_cr)) orig_end_balance,
DECODE(bal.currency_code, 'USR', 0, bal.period_net_cr) orig_period_net_cr,
DECODE(bal.currency_code, 'USR', 0, bal.period_net_dr) orig_period_net_dr,
fvtl2.description account_description,
' ' centre_deal_id,
' ' functional_currency,
gcc.account_type account_type,
SUBSTR(gcc.segment3, 10, 3) sub_account,
fvtl3.description analysis_desc,
fvtl1.description cost_center_desc,
SUBSTR(gcc.segment1, 10, 1) gaap_ind,
' ' management_structure,
' ' sub_pl,
SUBSTR(gcc.segment3, 1, 6) cdr6,
SUBSTR(gcc.segment3, 1, 9) cdr9,
gcc.code_combination_id code_combination_id,
DECODE(BAL.CURRENCY_CODE,
'USR',0,
BAL.BEGIN_BALANCE_DR_BEQ - BAL.BEGIN_BALANCE_CR_BEQ) rpt_open_balance,
DECODE(BAL.CURRENCY_CODE,
'USR',
0,
BAL.BEGIN_BALANCE_DR - BAL.BEGIN_BALANCE_CR) orig_open_bal,
DECODE(BAL.CURRENCY_CODE,
'USR',0,
BAL.PERIOD_NET_DR_BEQ) rpt_net_dr,
DECODE(BAL.CURRENCY_CODE,
'USR',0,
BAL.PERIOD_NET_CR_BEQ) rpt_net_cr
FROM gl.gl_balances bal,
gl.gl_code_combinations gcc,
gl.gl_sets_of_books gsob,
applsys.fnd_flex_value_sets fsets1,
applsys.fnd_flex_values fvals1,
applsys.fnd_flex_values_tl fvtl1,
applsys.fnd_flex_value_sets fsets2,
applsys.fnd_flex_values fvals2,
applsys.fnd_flex_values_tl fvtl2,
applsys.fnd_flex_value_sets fsets3,
applsys.fnd_flex_values fvals3,
applsys.fnd_flex_values_tl fvtl3,
applsys.fnd_flex_value_sets fsets4,
applsys.fnd_flex_values fvals4,
applsys.fnd_flex_values_tl fvtl4,
applsys.fnd_flex_value_sets fsets5,
applsys.fnd_flex_values fvals5,
applsys.fnd_flex_values_tl fvtl5
WHERE bal.set_of_books_id = p_set_of_books_id
AND gsob.set_of_books_id= bal.set_of_books_id
AND bal.period_name = rec_periods.period_name
AND bal.code_combination_id = gcc.code_combination_id
AND bal.actual_flag = 'A'
AND bal.template_id IS NULL
AND (gcc.segment3 BETWEEN '000000000000' AND '499999999ZZZ' OR gcc.segment3 like '988%')
--AND gcc.segment1 like 'R%'
AND gcc.summary_flag = 'N'
AND fsets1.flex_value_set_name = 'GECS_CENTER'
AND fvtl1.LANGUAGE = 'US'
AND fsets2.flex_value_set_name = 'GE_ACCOUNT'
AND fvtl2.LANGUAGE = 'US'
AND fsets3.flex_value_set_name = 'GECS_ANALYSIS'
AND fvtl3.LANGUAGE = 'US'
AND fsets4.flex_value_set_name = 'GE_BLE_PARAMETERS'
AND fvtl4.LANGUAGE = 'US'
AND SUBSTR(gcc.segment1, 1, 9) = fvals4.flex_value
AND fsets5.flex_value_set_name = 'GECS_BSLA_BIZ_MAPPING'
AND fvtl5.LANGUAGE = 'US'
AND fvals5.attribute1 = 'EFS'
AND fsets1.flex_value_set_id = fvals1.flex_value_set_id
AND fvals1.flex_value_id = fvtl1.flex_value_id
--AND fvals1.ENABLED_FLAG = 'Y'
AND gcc.segment2 = fvals1.flex_value
AND fsets2.flex_value_set_id = fvals2.flex_value_set_id
AND fvals2.flex_value_id = fvtl2.flex_value_id
--AND fvals2.enabled_flag = 'Y'
AND gcc.segment3 = fvals2.flex_value
AND fsets3.flex_value_set_id = fvals3.flex_value_set_id
AND fvals3.flex_value_id = fvtl3.flex_value_id
--AND fvals3.enabled_flag = 'Y'
AND gcc.segment4 = fvals3.flex_value
AND fsets4.flex_value_set_id = fvals4.flex_value_set_id
AND fvals4.flex_value_id = fvtl4.flex_value_id
--AND fvals4.enabled_flag = 'Y'
AND fsets5.flex_value_set_id = fvals5.flex_value_set_id
AND fvals5.flex_value_id = fvtl5.flex_value_id
--AND fvals5.enabled_flag = 'Y'
AND fvals4.attribute4 = fvals5.flex_value;
COMMIT;
END IF ;
COMMIT;
END LOOP;
--Insert/Update last_run_time to sysdate for businesses
BEGIN
SELECT COUNT(1)
INTO gbal_any_run
FROM XXCUSTOM.glc_smart_stream_bal_ext_run
WHERE BUSINESS_CODE = p_business_id;
IF (gbal_any_run > 0) THEN
UPDATE XXCUSTOM.glc_smart_stream_bal_ext_run
SET LAST_RUN_TIME = SYSDATE
WHERE BUSINESS_CODE = p_business_id;
COMMIT;
ELSE
INSERT INTO XXCUSTOM.glc_smart_stream_bal_ext_run
(BUSINESS_CODE, LAST_RUN_TIME)
VALUES
(P_BUSINESS_ID, SYSDATE);
COMMIT;
END IF;
END;
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'commited records ' || lv_tot_count ||
' into into glc_smart_stream_bal_extract');
RETURN 0;
EXCEPTION
WHEN OTHERS THEN
apps.fnd_file.put_line(which => apps.fnd_file.log,
buff => 'ERROR IN populate_' || p_business_id ||
'_balances' || '-' || SQLCODE || '-' ||
SQLERRM);
RETURN 2;
END balances ;

Saypank wrote:
Already One function had in database now days it takes more time to execute
Please guide me how i tunning this code Are you sure that you want to put the code in beer casks?
http://www.yourdictionary.com/tunning
Assuming not.
HOW TO: Post a SQL statement tuning request
HOW TO: Post a SQL statement tuning request - template posting
When your query takes too long
When your query takes too long ...
Though looking at it quickly the main thing you want to do is remove all the loops and use set based SQL statements instead.
And remove all the when others exception hiders too.
http://tkyte.blogspot.com/2008/01/why-do-people-do-this.html
http://tkyte.blogspot.com/2008/06/when-others-then-null-redux.html

Similar Messages

  • Doubt regarding plsql certification exam

    hello to all
    i passed out sql exam of ocp
    Test Title: 1Z0-007 Introduction to Oracle9i: SQL on
    may 2004.
    now i want to write the plsql exam..i have the following
    questions.
    1)what is the name of the exam i should write now?
    2) will there be latest exam guide books available for
    preparing for exams?
    like i have a book called
    oracle ocp developer plsql program units exam guide(1z0-101)
    so now if the plsql exam is 1z0-047, then will i get a new exam guide
    book for the same?
    i want be an oca, and so i want to write the plsql exam,
    and i want to know the oracle press book (exam guide book)
    which should help me.
    and if any one of you have any questionnaires of plsql exam..
    please do email me at [email protected]
    Gautam

    Hi gautam,
    I have just joined the forun and this is my first post.
    I am also currently preparing for the OCA exam 1Z0-007.
    the cert path is as:
    Oracle9i Database: Introduction to SQL (#1Z0-007)
    Oracle9i Database: Fundamentals I (#1Z0-031)
    =====you get an OCA=====
    Oracle9i Database: Fundamentals II (#1Z0-032)
    Oracle9i Database: Performance Tuning (#1Z0-033)
    =====you get an OCP=====
    Gautam i am working full time and prepare for the exam only during free time.
    I dont have an Oracle 9i installed on my machine.Can you plez tell me an Oracle DB resource server so that i can access it thru iSQL(browser) and practice out.
    Thanx & Regards
    Asheesh

  • Regarding Performance Tunning of Mapping & Process Flow

    Hi,
    i have around 60-70 GB data in Target database.
    i need do improve the performance of Mapping and Process flow.
    i have used lookup transformation in mapping.
    Plz give me some tips for improving performance of Process.
    Thanks,

    Please go through a Performance Tuning Book for Oracle 10gR2.
    Most importantly remember that in Oracle 10g, your performace of mappings can be increased manifold by following these steps:
    1. Do not design a mapping wherein you load a table and then select from that table to load another table and so on. This is a bad design.
    2. Keep mappings as simple as possible. In other words if a mapping is complicated in terms of joins or other operators then split the mapping into more than one parts.
    3. Also check that all your source tables should be analyzed using DBMS_STATS. Ensuring this one single step can make your work very easy.
    4. Put indexes where you find your predicate has a very high selectivity. Also keep in mind the column ordering of the index.
    5. Use Set Based operation, since it is always a good idea to achieve the result by running one single query rather than a loop and multiple inserts.
    6. Use APPEND PARALLEL hint while loading the target tables. This will not generate wny redo and save time
    7. Please have a recheck while usng some performance intensive operators like UNION, DISTINCT and AGGREGATION
    8. When using a sequence operator to load a large table, check that the sequence should be cached with some values.
    9. When loading large data HASH JOINS are the most appropriate more often than not. So you can use USE_HASH as the hint for selecting from large tables.
    10. Filter out as much unrequired data from a table as soon as possible in the mapping before doing multiple joins.
    I am sure there are many more ... the above is just a random list that I could remember now. Please go through Oracle Performance Tuning Guide, Tom Kyte's Oracle Expert One on One. Knowledge of performance tuning will grow with experience. I am also learning each day !!!
    Regards
    AP

  • Regarding Performance tunning...

    HI Experts,
    can you suggest me, how exactly performance is checked.
    what is the measure we considered for performance check.
    what are ideals status of the performance check for a certain program.
    that is, how much should be database use, abap use and the system
    use in the program.
    i checked my program in t-code SE30, and it is showing almost
    above 90% use of database and very less use of abap and
    almost no use of system.
    so please tell me exactly how much it should be...
    Thanks in advance.
    Regard,
    vijay chavan

    Hi
    these are the ways of checking performance of a report
    Tools for Performance Analysis
    Run time analysis transaction SE30
    SQL Trace transaction ST05
    Extended Program Check (SLIN)
    Code Inspector ( SCI)
    <b>Run time analysis transaction SE30</b> :This transaction gives all the analysis of an ABAP program with respect to the database and the non-database processing.
    <b>SQL Trace transaction ST05</b>: The trace list has many lines that are not related to the SELECT statement in the ABAP program. This is because the execution of any ABAP program requires additional administrative SQL calls. To restrict the list output, use the filter introducing the trace list.
    The trace list contains different SQL statements simultaneously related to the one SELECT statement in the ABAP program. This is because the R/3 Database Interface - a sophisticated component of the R/3 Application Server - maps every Open SQL statement to one or a series of physical database calls and brings it to execution. This mapping, crucial to R/3s performance, depends on the particular call and database system. For example, the SELECT-ENDSELECT loop on a particular database table of the ABAP program would be mapped to a sequence PREPARE-OPEN-FETCH of physical calls in an Oracle environment.
    The WHERE clause in the trace list's SQL statement is different from the WHERE clause in the ABAP statement. This is because in an R/3 system, a client is a self-contained unit with separate master records and its own set of table data (in commercial, organizational, and technical terms). With ABAP, every Open SQL statement automatically executes within the correct client environment. For this reason, a condition with the actual client code is added to every WHERE clause if a client field is a component of the searched table.
    To see a statement's execution plan, just position the cursor on the PREPARE statement and choose Explain SQL. A detailed explanation of the execution plan depends on the database system in use.
    <b>Extended Program Check</b>
    This can be called in through transaction SE38 or through transaction SLIN. This indicates possible problems that may cause performance problems.
    <b>Code Inspector (SCI)</b>
    You can call the Code Inspector from the ABAP Editor (SE38), the Function Builder (SE37), the Class Builder (SE24), or as a separate transaction (SCI).
    The Code Inspector indicates possible problems. However, note that, especially with performance issues: There is no rule without exception. If a program passes an inspection, it does not necessarily mean that this program will have no performance problems.
    <b>Run time analysis transaction SE30</b>
    <b>steps</b>
    In Transaction SE30, fill in the transaction name or the program name which needs to be analyzed for performance tuning.
    For our case, let this be “ZABAP_PERF_TUNING”
    Run time analysis transaction SE30
    After giving the required inputs to the program, execute it. After the final output list has been displayed, PRESS the “BACK” button.
    On the original SE30 screen, now click on “ANALYZE” button.
    The percentage across each of the areas ABAP/ Database/System shows the percentage of total time used for those areas and load on these areas while running the program . The lesser the database load faster the program runs.
    <b>SQL Trace – ST05</b>
    <b>steps</b>
    <u>Starting the Trace:</u>
    To analyze a trace file, do the following:
    Choose the menu path Test &#61614; Performance Trace in the ABAP Workbench or go to Transaction ST05. The initial screen of the test tool appears. In the lower part of the screen, the status of the Performance Trace is displayed. This provides you with information as to whether any of the Performance Traces are switched on and the users for which they are enabled. It also tells you which user has switched the trace on.
    Using the selection buttons provided, set which trace functions you wish to have switched on (SWL trace, enqueue trace, RFC trace, table buffer trace).
    If you want to switch on the trace under your user name, choose Trace on. If you want to pass on values for one or several filter criteria, choose Trace with Filter. Typical filter criteria are: the name of the user, transaction name, process name, and program name.
    Now run the program to be analyzed.
    Stopping the Trace:
    To deactivate the trace:
    Choose Test &#61614;Performance Trace in the ABAP Workbench. The initial screen of the test tool appears. It contains a status line displaying the traces that are active, the users for whom they are active, and the user who activated them.
    Select the trace functions that you want to switch off.
    Choose Deactivate Trace. If you started the trace yourself, you can now switch it off immediately. If the performance trace was started by a different user, a confirmation prompt appears before deactivation-
    <u>Analyzing a Sample trace data:</u>
    PREPARE: Prepares the OPEN statement for use and determines the access method.
    OPEN: Opens the cursor and specifies the selection result by filling the selection fields with concrete values.
    FETCH: Moves the cursor through the dataset created by the OPEN operation. The array size displayed beside the fetch data means that the system can transfer a maximum package size of 392 records at one time into the buffered area.
    <b>Reward if useful</b>

  • Please help regarding PLSQL coding standards

    Hi,
    Can you please send any document for PL/SQL coding standards,
    Please help.. I did nt find any good resources on net regarding..
    Pleease help me if any pdf regarding are exitst to my mail id
    [email protected]
    Thanks and Regards
    asp

    I did nt find any good resources on net regarding..Here is a list from the net for you to start with (courtesy of many of the fellow posters here in these forums), and there will be plenty more. Just need to search correctly.
    http://www.redhat.com/docs/manuals/waf/rhea-dg-waf-en-6.0/ap-sql-standards.html
    http://www.orafaq.com/faqplsql.htm
    http://www.williamrobertson.pwp.blueyonder.co.uk/documents/plsqlcodingstandards.html
    http://www.orafaq.com/node/48
    http://apex.oracle.com/pls/otn/f?p=2853:4:11598658413321972351::NO::P4_QA_ID:3262
    http://www.bbc.co.uk/guidelines/newmedia/technical/databases.shtml
    Message was edited by:
    Kamal Kishore
    Message was edited by:
    Kamal Kishore

  • Regarding JVM TUNNING

    I WANT TO INCREASE THE HEAP SIZE OF JVM .PLZ LET ME KNOW ASAP

    Saypank wrote:
    Already One function had in database now days it takes more time to execute
    Please guide me how i tunning this code Are you sure that you want to put the code in beer casks?
    http://www.yourdictionary.com/tunning
    Assuming not.
    HOW TO: Post a SQL statement tuning request
    HOW TO: Post a SQL statement tuning request - template posting
    When your query takes too long
    When your query takes too long ...
    Though looking at it quickly the main thing you want to do is remove all the loops and use set based SQL statements instead.
    And remove all the when others exception hiders too.
    http://tkyte.blogspot.com/2008/01/why-do-people-do-this.html
    http://tkyte.blogspot.com/2008/06/when-others-then-null-redux.html

  • Regarding PLSQL web services

    I'm calling a plsql stored procedure on PHP. The URL looks something like
    http://<servername><port>/pls/<DAD>/packagename.procedurename
    I get HTTP 404 error if the procedure has a PLSQL table type parameter in it.
    Any ideas why it's so? Has the mod_plsql settings got something to do with this, because this behavior is not seen on all environments?
    DB version: 8.1.7.3.0

    Check SICF that the service is activated.
    Go to ST01, start an authorisation trace. Attempt to use the service, then look at the trace to check if it's an auth issue.
    Check SM21 for any indication of an issue at that time.
    The problems I've encountered have been the service not being activated, the role not having the service included with the correct hash entry as in USOBHASH, or other authorisation errors.
    Finally, go to SMICM, and using one of the options there, up the trace level to 3. But if you get to that stage, you're really getting into networking type knowledge.

  • Plsql tunning?

    dear expets,
    I have developed the following code for deletion. The scripting taking too long how to solve this issue.
    my constraints
    1. i need to track failure record (so i used forall .. save expection.)
    Create or Replace PROCEDURE bill_delete(period date)
       IS
          CURSOR c4 IS
          SELECT a.rowid,a.*
            FROM ibsoifc.ibs_x_t_bill a
           WHERE bill_month <= period
             AND balance_ser_amt = 0
             AND balance_tax_amt = 0;
             --AND bpref_no = :cons;
          TYPE tsch IS TABLE OF c4%ROWTYPE;
          vtsch      tsch;
          cnt        NUMBER := 0;
          stime      NUMBER;
          etime      NUMBER;
          DURATION   NUMBER;
          rcount     NUMBER;
          errorsd   PLS_INTEGER;
          ecode     NUMBER;
          val1   VARCHAR2 (100);
          val2   VARCHAR2 (100);
          val3   VARCHAR2 (100);
          val4   VARCHAR2 (100);     
       BEGIN
          BEGIN
             stime := DBMS_UTILITY.get_time ();
             OPEN c4;
             LOOP
                FETCH c4
                BULK COLLECT INTO vtsch LIMIT 1000;
                IF vtsch.COUNT = 1000
                THEN
                   cnt := cnt + 1;
                END IF;
                FORALL i IN vtsch.first .. vtsch.last SAVE EXCEPTIONS
                   Delete from ibsoifc.ibs_x_t_bill where rowid = vtsch(i).rowid;
                    --bill_month = vtsch(i).bill_month;
                Commit;
                EXIT WHEN c4%NOTFOUND;
             END LOOP;
             etime := DBMS_UTILITY.get_time ();
             DURATION := ((etime - stime) / 100) / 60;
             rcount :=
                 (cnt * 1000) + vtsch.COUNT - NVL (SQL%BULK_EXCEPTIONS.COUNT, 0);
             INSERT INTO process_stage_log
                  VALUES (SYSDATE, 'IBS_X_T_BILL-D', DURATION, rcount);
             CLOSE c4;
             COMMIT;
          EXCEPTION
             WHEN OTHERS
             THEN
                Begin
                errorsd := SQL%BULK_EXCEPTIONS.COUNT;
                IF errorsd > 0
                THEN
                   FOR j IN 1 .. errorsd
                   LOOP
                      ecode := SQL%BULK_EXCEPTIONS (j).ERROR_CODE;
                      val1 :=
                             vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).doc_no;
                      val2 :=
                           vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bpref_no;
                      val3 :=
                         vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bill_month;
                      val4 :=
                         vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).service_code;
                      INSERT INTO process_error_log
                           VALUES (SYSDATE, ecode, 'IBS_X_T_BILL', 'doc_no', val1,
                                   'bpref_no', val2, 'bill_month', val3, 'Service_code', val4,'DELETE');
                      etime := DBMS_UTILITY.get_time ();
                      DURATION := ((etime - stime) / 100) / 60;
                      rcount := (cnt * 1000) + vtsch.COUNT - NVL (SQL%BULK_EXCEPTIONS.COUNT, 0);
                      INSERT INTO process_stage_log VALUES (SYSDATE, 'IBS_X_T_BILL-D', DURATION, rcount);
                   END LOOP;
                END IF;
                Exception
                   When others then
                      etime := DBMS_UTILITY.get_time ();
                      DURATION := ((etime - stime) / 100) / 60;
                      INSERT INTO process_stage_log VALUES (SYSDATE, 'IBS_X_T_BILL-D', DURATION, 0);
                End;
          END;
       END bill_delete;This script is database procedure which is called through form 6i
    Thanks in advance
    kanish

    Hi,
    use dbms_profiler to narrow down to a single SQL statement, then troubleshoot the problem statement using standard SQL tuning techniques (such as cardinality feedback tuning using dbms_xplan).
    Best regards,
    Nikolay

  • Regarding TV Tuner

    Dear Sir
                      I have HP Pavelion dv4 1318tu laptop and i want to know integrated tv tuner is present in this model or not???
    please reply
                                     thanks

    Here is another Thread about the same problem. This has been an ON-Going problem. Here is the other thread:
     Home > Notebook > TV/Media Center > Pavilion dv7t - no TV tuner signal
    http://h30434.www3.hp.com/t5/Notebook-TV-Tuners-and-Media/Pavilion-dv7t-no-TV-tuner-signal/td-p/1883...
    If you have a problem with your Integral TV Tuner, Have HP support connect you with the Escalation Team and they offer vouchers and the USB HP TV Tuner.
    The problem is the design of the Port and connector. Why I had to waste my time sending my unit twice back and get no permanent solution is just outrageously incompetent when they knew they had a problem

  • Need help in regarding Oracle PLSQL developer interview questions

    Hi all,
    I am totally new in this field regarding plsql. I have just finished training in oracle plsql and in oracle financials. But for starting career i am looking jobs as:Oracle plsql developer. Can somebody help me what type of questions people going to ask? I am not confident yet, i have made my resume but for submitting resume i just want to be aware for the interview questions. Can somebody help me in telling me good questions and answers as to what to prepare?
    Thanks in advance.

    1.
    Do you have experience in Oracle 10g? If so, what are your favorite new features? (shows depth of experience and how well they are keeping up with technology)
    2.
    Partitioning (Practical Scenarios)
    1.
    Have you ever worked with partitioned tables? Example:
    2.
    What types of partitioning?
    3.
    What types of indexing, global or local? Why did you choose global or local?
    4.
    What do you see in SQL that is accessing partitioned tables that enables Oracle to take advantage of partitioning?
    5.
    What is partition pruning?
    3.
    PL/SQL Bulk Features
    1.
    Have you ever used PL/SQL bulk features? Which ones? Can you provide an example?
    2.
    What makes bulk processing faster?
    3.
    What PL/SQL data constructs are required to use bulk features?
    4.
    Oracle Collections
    1.
    What are the three types of collections?
    2.
    When would you use a varray versus a nested table?
    5.
    Global Temporary Tables
    1.
    Have you ever used Global Temporary Tables? Example:
    2.
    How does Oracle treat Global Temporary Tables differently than regular tables, making them faster?
    6.
    Autonomous Transactions
    1.
    What is an autonomous transaction? Example:
    7.
    SQL Tuning
    1.
    Someone comes to you with a SQL statement that is running slow, what are some potential problems that can be identified just by looking at the SQL statement?
    2.
    What are the steps you follow in the database to tune SQL?
    8.
    Locking Techniques
    1.
    Types of Locks
    1.
    Optimistic
    2.
    Pessimistic
    3.
    Lock Escalation
    9.
    Autonomous transactions, where to use examples if any
    10.
    Difference between Truncate and Delete Statement
    11.
    PL/SQL tables, index by tables, VARRAY, associate arrays, differences and when to use
    12.
    Performance tuning related, Using Explain plan, SQL* Plus auto trace, and using tkprof
    13.
    Different types of joins oracle uses ( Hash join, Merge Join, Nested loop join)
    14.
    Oracle SQL ANSI syntax ( JOIN USING, JOIN ON, LEFT OUTER JOIN,RIGHT OUTER JOIN etc..)
    15.
    dbms_profiler package uses
    16.
    Unit testing approach, if you know and worked on out PLSQL frame work for automatic testing, its big advantageous
    17.
    Oracle approach for read consistency, what is SCN, dirty reads, phantom reads etc..
    18.
    Standards ( Coding standards, naming standards etc.) , There are guidelines and naming standards for variables, package, procedure, function names, database object names etc…( Be prepared what standards you followed in previous projects )
    19.
    Snapshot too old error, fetch out of sequence error when it comes, should be able to explain.
    20.
    Oracle block, what it contains. Row chaining, row migration concepts
    21.
    Version control software’s (experience in clearcase and clearquest is big advantage). If you have not used these, know about the importance of these and be prepared to explain which ones you used in previous projects, and how the PL/SQL code used to deploy.
    22.
    Oracle server architecture, know about oracle memory structures, background processes overview

  • Plsql collections

    Hi,
    I am working with oracle 10g.
    Still i was not familiar with PLSQL Tables or collections.
    Please send me the link or any notes regarding PLSQL Tables.
    Thanks and Regards,
    Ansaf.

    Ansaf wrote:
    Hi,
    I am working with oracle 10g.
    Still i was not familiar with PLSQL Tables or collections.
    Please send me the link or any notes regarding PLSQL Tables.
    Thanks and Regards,
    Ansaf.when all else fail Read The Fine Manual
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/collections.htm#sthref1031

  • Using ant to build and deploy plsql packages to a 11g wls.

    Hi all,
    Not sure is this is the right place, but I found a few other threads in this forum regarding plsql and ant, so I'll try this one.
    My firm is moving from 10g ADF applcations to 11g SOA applications. When I'm not busy being lost in the whole new SOA world, I also have the pleasure of building our ant scripts. :-)
    It has been years since I looked at the deploy scripts I made for 10g, so I'm a bit rusty.
    I used wsassemble in our old scripts and I used http://download.oracle.com/docs/cd/B25221_05/web.1013/b14434/wsassemble.htm as a reference. But I can't seem to find the same documentation for 11g? I tried http://download.oracle.com/docs/cd/E12839_01/index.htm but it doesn't seem to have anything about plsqlAssemble, genInterface, genproxy etc. for 11g wls servers? I also tried google a while to no avail.
    For example, I'm having problems setting the values for the ant-oracle.properties.
    So can someone please throw some links my way, so I can read how to build and deploy plsql packages to a 11g wls server using ant? Thanks!
    Cheers,
    William

    Hi,
    Did you ever find an answer to this question ?
    I am currently creating the webservice using webservices assembler from 10g/OC4j, then using the SmartUpgrade tool to re-engineer the webservice for deployment to 11g
    ( SmartUpgrade info here http://docs.oracle.com/cd/E16764_01/doc.1111/e15878/intro.htm)
    G
    Edited by: user999097 on Mar 5, 2012 1:16 PM

  • SQLJ vs PLSQL

    Hi All,
    Does Oracle have a medium to long term policy about which language will be used within the database?
    Will SQLJ eventually phase out PLSQL?
    I was always a fan of PLSQL, but I have found SQLJ to be equally as good a server based langauge. Coupled with the fact that it can be recompiled against other databases, it should solve the issues that arise when developers are asked to write stored procedure code in PLSQL and Sybase's TransactSQL in the same project.
    However, I have noticed that SQLJ has not been accepted by the development community as a well as I would have imagined. I have worked on three projects using SQLJ, however I was responsible for introducing SQLJ in each case.
    Friends and colleagues still regard PLSQL as the better language, even though they are using Java in the other tiers within their applications. In many cases, they are not aware of the benefits of SQLJ and are wary of a possible steep learning curve.
    I wonder if anyone else has similar ideas/comments on the use of PLSQL and SQLJ, what would you recommend for new project development?
    Regards,
    Colin Smith

    SQLJ and JDBC are ways to access the database - from the client, from the middle tier, or from inside the database server itself.
    JDBC is an API specified by Sun as part of Java, while SQLJ is an ANSI (soon ISO) standard for embedding SQL in Java.
    JDBC is more widespread, while SQLJ is a more productive environment.
    Stored procedures are pieces of code executed in the database as part of your database session. In Oracle Databases, stored procedures are usually written either in PL/SQL (a propertietary Oracle language) or in Java. If you write your stored procedure in Java you use JDBC or SQLJ to access the database - essentially the same code you would write on the client or in a middle-tier.

  • Jrockit crashes due to outofmemory and illegal memory acces

    Hello,
    We have been using jrmc-3.1.2-1.6.0 and lately we are seeing JVM crashes after every couple days. Note: We have been seeing these crashes recently , for last 1 year we did not see such crashes.
    Following are different issues that we have seen over last few days:
    1. Crash due to illegal memory access
    2. Crash due to out of memory error
    3. Sever becoming unresponsive/Idle
    For illegal memory access and out of memory crashes, there was jRockit dump file created and Dump file seems to be pointing at Jrockit libjvm.so module for the exception/crash.
    Any help would be appreciated!
    *** Dump for Illegal Memory Access
    Error Message: Illegal memory access. [54]
    Signal info : si_signo=11, si_code=1 si_addr=0x10
    Version : BEA JRockit(R) R27.6.5-32_o-121899-1.6.0_14-20091001-2113-linux-ia32
    CPU : Intel Core i7 (HT) SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 Core Intel64
    Number CPUs : 4
    Tot Phys Mem : 12762509312 (12171 MB)
    OS version : Red Hat Enterprise Linux Server release 5.6 (Tikanga)
    Linux version 2.6.18-164.15.1.el5PAE ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Mon Mar 1 11:14:09 EST 2010 (i686)
    Thread System: NPTL
    Java locking : Lazy unlocking enabled (class banning) (transfer banning)
    State : JVM is running
    Command Line : -Djava.util.logging.config.file=/usr/local/springsource/tcServer-6.0/zplus/conf/logging.properties -Djava.util.logging.manager=com.springsource.tcserver.serviceability.logging.TcServerLogManager -Xmx2048m -Xms2048m -Djava.rmi.server.hostname=300714-web8.echovox.com -XgcPrio:pausetime -DTERRACOTTA_URL=338449-web10.echovox.com:9510,338450-web11.echovox.com:9510 -Dapp_version= -Xmanagement -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dehcache.monitor.enabled=True -Djava.endorsed.dirs=/usr/local/springsource/tcServer-6.0/tomcat-6.0.20.A/endorsed -Dcatalina.base=/usr/local/springsource/tcServer-6.0/zplus -Dcatalina.home=/usr/local/springsource/tcServer-6.0/tomcat-6.0.20.A -Djava.io.tmpdir=/usr/local/springsource/tcServer-6.0/zplus/temp -Dsun.java.launcher=SUN_STANDARD org.apache.catalina.startup.Bootstrap start
    java.home : /usr/local/jrmc-3.1.2-1.6.0/jre
    j.class.path : :/usr/local/springsource/tcServer-6.0/tomcat-6.0.20.A/bin/bootstrap.jar
    j.lib.path : /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/jrockit:/usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386:/usr/local/jrmc-3.1.2-1.6.0/jre/../lib/i386
    JAVA_HOME : <not set>
    JAVAOPTIONS: <not set>
    LD_LIBRARY_PATH: /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/jrockit:/usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386:/usr/local/jrmc-3.1.2-1.6.0/jre/../lib/i386
    LD_PRELOAD : <not set>
    LD_ASSUME_KERNEL: <not set>
    StackOverFlow: 0 StackOverFlowErrors have occured
    OutOfMemory : 0 OutOfMemoryErrors have occured
    C Heap : Good; no memory allocations have failed
    GC Strategy : Mode: pausetime. Currently using strategy: genconcon
    GC Status : OC currently running, in phase: marking. This is OC#2905.
    : YC is not running. Last finished YC was YC#100045.
    OC History : Strategy genconcon was used for OC#2776.
    : Strategy genconpar was used for OC#2777 to OC#2781.
    : Strategy genconcon was used for OC#2782 to OC#2783.
    : Strategy genconpar was used for OC#2784 to OC#2790.
    : Strategy genconcon was used for OC#2791 to OC#2905.
    YC History : Ran 1 YCs before OC#2901.
    : Ran 0 YCs before OC#2902.
    : Ran 1 YCs before OC#2903.
    : Ran 0 YCs before OC#2904.
    : Ran 2 YCs before OC#2905.
    YC Promotion : Last YC successfully promoted all objects
    Heap : 0x8b00000 - 0x88b00000 (Size: 2048 MB)
    Compaction : 0x49b00000 - 0x51b00000 (Current compaction type: internal)
    NurseryList : 0xaf67e18 - 0x8226c988
    KeepArea : 0x817031e8 - 0x8226c988
    NurseryMarker: [ 0x80d031f0,  0x817031e8 ]
    CompRefs : References are 32-bit.
    Registers (from ThreadContext: 0x96b75420 / OS context: 0x96b7551c):
    eax = 00000000 ecx = ffffffcc edx = 8b80eb78 ebx = 8b80eb78
    esp = 96b75814 ebp = 96b75960 esi = 96b75a48 edi = 00000000
    es = 0000007b cs = 00000073 ss = 0000007b ds = 0000007b
    fs = 00000000 gs = 00000033
    eip = b7d3a397 eflags = 00210296
    Loaded modules:
    (* denotes the module causing the exception)
    08048000-08058233 /usr/local/jrmc-3.1.2-1.6.0/jre/bin/java
    b7f24000-b7f2462b /usr/local/jrmc-3.1.2-1.6.0/jre/bin/java
    00754000-00768f17 /lib/libpthread.so.0
    006b2000-006d8a23 /lib/libm.so.6
    006ab000-006ad0fb /lib/libdl.so.2
    00550000-006a2723 /lib/libc.so.6
    00531000-0054b4f7 /lib/ld-linux.so.2
    b7c46000-b7e9fea7 */usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/jrockit/libjvm.so
    007a3000-007a9ebf /lib/librt.so.1
    b722f000-b723839b /lib/libnss_files.so.2
    b7118000-b71229bb /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libverify.so
    b70f3000-b7115f57 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libjava.so
    007ae000-007c27a7 /lib/libnsl.so.1
    b723e000-b7243ef0 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/native_threads/libhpi.so
    b59f0000-b59fe3e4 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libzip.so
    b5805000-b580a666 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libmanagement.so
    b5224000-b5236a18 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libnet.so
    b723c000-b723c6ad /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/librmi.so
    b2d42000-b2d45c2f /lib/libnss_dns.so.2
    b2d2e000-b2d3d74b /lib/libresolv.so.2
    b2d4a000-b2d503a4 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libnio.so
    b1f9d000-b1fc5857 /usr/local/springsource/tcServer-6.0/zplus/temp/tmpSigarJars841342613926113968186721535772/libsigar-x86-linux-1.6.4.so
    Stack:
    (* marks the word pointed to by the stack pointer)
    96b75814: b7cbce41* 00000000 006772e2 b04dbab8 006a4ff4 00000030
    96b7582c: 00000002 96b758a0 00000000 00000000 00010000 0061eea8
    96b75844: b7e48510 00010000 00000000 0061eeb9 b7d8f0f8 20000000
    96b7585c: 00010000 00000000 00004022 ffffffff 00000000 96b75890
    Code:
    (* marks the word pointed to by the instruction pointer)
    b7d3a364: c0a108ec e8b7f0fe ffffffa0 f0fed4a1 ff96e8b7 b8c9ffff
    b7d3a37c: 00000001 900debc3 90909090 90909090 90909090 8be58955
    b7d3a394: 8b5d0845* d2851050 0fc0950f b60fc0b6 768dc3c0 27bc8d00
    b7d3a3ac: 00000000 53e58955 0134ec81 9d8d0000 fffffee8 04245c89
    "RMI TCP Connection(idle)" id=440712 idx=0x7c4 tid=825 lastJavaFrame=0x96b75ecc
    Stack 0: start=0x96b54000, end=0x96b78000, guards=0x96b59000 (ok), forbidden=0x96b57000
    Thread Stack Trace:
    at jniExceptionCheck+7()@0xb7d3a397
    at cmgrGenerateCode+260()@0xb7cbe024
    at generate_code2+937()@0xb7da6c99
    at generate_code+97()@0xb7da6f11
    at get_runnable_codeinfo2+275()@0xb7da74c3
    at call_java+317()@0xb7d42f0d
    at jniInvoke+110()@0xb7d451be
    -- Java stack --
    at jrockit/vm/Reflect.invokeMethod(Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(Native Method)
        at sun/reflect/NativeConstructorAccessorImpl.newInstance0(Ljava/lang/reflect/Constructor;[Ljava/lang/Object;)Ljava/lang/Object;(Native Method)
        at sun/reflect/NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun/reflect/DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)[optimized]
    at java/lang/reflect/Constructor.newInstance(Constructor.java:513)[optimized]
    at java/lang/Class.newInstance0(Class.java:355)[inlined]
    at java/lang/Class.newInstance(Class.java:308)[optimized]
    at sun/reflect/MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
    at jrockit/vm/AccessController.doPrivileged(AccessController.java:233)[inlined]
    at jrockit/vm/AccessController.doPrivileged(AccessController.java:241)[inlined]
    at sun/reflect/MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)[optimized]
    at sun/reflect/MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.java:59)
    at sun/reflect/NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:28)
    at sun/reflect/DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[optimized]
    at java/lang/reflect/Method.invoke(Method.java:597)[inlined]
    at java/io/ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)[inlined]
    at java/io/ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)[optimized]
    at java/io/ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)[inlined]
    at java/io/ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)[inlined]
    at java/io/ObjectOutputStream.writeObject(ObjectOutputStream.java:326)[optimized]
    at sun/rmi/server/UnicastRef.marshalValue(UnicastRef.java:274)
    at sun/rmi/server/UnicastServerRef.dispatch(UnicastServerRef.java:315)
    at sun/rmi/transport/Transport$1.run(Transport.java:159)
    at jrockit/vm/AccessController.doPrivileged(AccessController.java:255)[optimized]
    at sun/rmi/transport/Transport.serviceCall(Transport.java:155)
    at sun/rmi/transport/tcp/TCPTransport.handleMessages(TCPTransport.java:535)
    at sun/rmi/transport/tcp/TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun/rmi/transport/tcp/TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java/util/concurrent/ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[inlined]
    at java/util/concurrent/ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[optimized]
    at java/lang/Thread.run(Thread.java:619)[optimized]
    at jrockit/vm/RNI.c2java(IIIII)V(Native Method)
    -- end of trace
    Extended, platform specific info:
    libc release: 2.5-stable
    Elf headers:
    libc ehdrs: EI: 7f454c46010101000000000000000000 ET: 3 EM: 3 V: 1 ENTRY: 00565fe0 PHOFF: 00000034 SHOFF: 0019ccbc EF: 0x0 HS: 52 PS: 32 PHN; 10 SS: 40 SHN: 75 STIDX: 74
    libpthread ehdrs: EI: 7f454c46010101000000000000000000 ET: 3 EM: 3 V: 1 ENTRY: 00758850 PHOFF: 00000034 SHOFF: 00021474 EF: 0x0 HS: 52 PS: 32 PHN; 9 SS: 40 SHN: 40 STIDX: 39
    libjvm ehdrs: EI: 7f454c46010101000000000000000000 ET: 3 EM: 3 V: 1 ENTRY: 0004c3a0 PHOFF: 00000034 SHOFF: 012c9a58 EF: 0x0 HS: 52 PS: 32 PHN; 4 SS: 40 SHN: 29 STIDX: 26
    * If you see this dump, please go to *
    * http://edocs.bea.com/jrockit/go2troubleshooting.html *
    * for troubleshooting information. *
    ===== END DUMP ===============================================================
    ****** Dump for OutOfMemory error
    Error Message: Out of memory [68]
    Signal info : si_signo=11, si_code=1 si_addr=(nil)
    Fatal Error : Reference Iteration refIterInit src/jvm/code/runtime/refiter.c:167
    Version : BEA JRockit(R) R27.6.5-32_o-121899-1.6.0_14-20091001-2113-linux-ia32
    CPU : Intel Core i7 (HT) SSE SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 Core Intel64
    Number CPUs : 4
    Tot Phys Mem : 12762509312 (12171 MB)
    OS version : Red Hat Enterprise Linux Server release 5.6 (Tikanga)
    Linux version 2.6.18-164.15.1.el5PAE ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Mon Mar 1 11:14:09 EST 2010 (i686)
    Thread System: NPTL
    Java locking : Lazy unlocking enabled (class banning) (transfer banning)
    State : JVM is running
    Command Line : -Djava.util.logging.config.file=/usr/local/springsource/tcServer-6.0/zplus/conf/logging.properties -Djava.util.logging.manager=com.springsource.tcserver.serviceability.logging.TcServerLogManager -Xmx2048m -Xms2048m -Djava.rmi.server.hostname=300714-web8.echovox.com -XgcPrio:pausetime -DTERRACOTTA_URL=338449-web10.echovox.com:9510,338450-web11.echovox.com:9510 -Dapp_version= -Xmanagement -Dcom.sun.management.jmxremote.port=7091 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dehcache.monitor.enabled=True -Djava.endorsed.dirs=/usr/local/springsource/tcServer-6.0/tomcat-6.0.20.A/endorsed -Dcatalina.base=/usr/local/springsource/tcServer-6.0/zplus -Dcatalina.home=/usr/local/springsource/tcServer-6.0/tomcat-6.0.20.A -Djava.io.tmpdir=/usr/local/springsource/tcServer-6.0/zplus/temp -Dsun.java.launcher=SUN_STANDARD org.apache.catalina.startup.Bootstrap start
    java.home : /usr/local/jrmc-3.1.2-1.6.0/jre
    j.class.path : :/usr/local/springsource/tcServer-6.0/tomcat-6.0.20.A/bin/bootstrap.jar
    j.lib.path : /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/jrockit:/usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386:/usr/local/jrmc-3.1.2-1.6.0/jre/../lib/i386
    JAVA_HOME : <not set>
    JAVAOPTIONS: <not set>
    LD_LIBRARY_PATH: /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/jrockit:/usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386:/usr/local/jrmc-3.1.2-1.6.0/jre/../lib/i386
    LD_PRELOAD : <not set>
    LD_ASSUME_KERNEL: <not set>
    StackOverFlow: 0 StackOverFlowErrors have occured
    OutOfMemory : 0 OutOfMemoryErrors have occured
    C Heap : 1 memory allocations have failed
    : First failure was a mmMalloc of 20 bytes
    : Last failure was a mmMalloc of 20 bytes
    GC Strategy : Mode: pausetime. Currently using strategy: genconpar
    GC Status : OC is not running. Last finished OC was OC#1945.
    : YC is not running. Last finished YC was YC#90824.
    OC History : Strategy genconpar was used for OC#1745 to OC#1755.
    : Strategy genparpar was used for OC#1756 to OC#1757.
    : Strategy genconpar was used for OC#1758 to OC#1938.
    : Strategy genparpar was used for OC#1939 to OC#1940.
    : Strategy genconpar was used for OC#1941 to OC#1945.
    YC History : Ran 1 YCs before OC#1941.
    : Ran 6 YCs before OC#1942.
    : Ran 4 YCs before OC#1943.
    : Ran 6 YCs before OC#1944.
    : Ran 4 YCs before OC#1945.
    : Ran 5 YCs since last OC.
    YC Promotion : Last YC successfully promoted all objects
    Heap : 0x8100000 - 0x88100000 (Size: 2048 MB)
    Compaction : 0x64100000 - 0x68100020 (Current compaction type: internal)
    NurseryList : 0x8214640 - 0x84438f20
    KeepArea : (no keeparea in use)
    NurseryMarker: [ 0x827bfd10,  0x83996a00 ]
    CompRefs : References are 32-bit.
    Registers (from ThreadContext: 0x2a96c20 / OS context: 0x2a96d1c):
    eax = 00001267 ecx = 00000000 edx = 00000042 ebx = b7eb0de4
    esp = 02a97010 ebp = 02a97028 esi = 00000044 edi = 02a97078
    es = 0000007b cs = 00000073 ss = 0000007b ds = 0000007b
    fs = 00000000 gs = 00000033
    eip = b7cfca45 eflags = 00010206
    Loaded modules:
    (* denotes the module causing the exception)
    08048000-08058233 /usr/local/jrmc-3.1.2-1.6.0/jre/bin/java
    b7f44000-b7f4462b /usr/local/jrmc-3.1.2-1.6.0/jre/bin/java
    00754000-00768f17 /lib/libpthread.so.0
    006b2000-006d8a23 /lib/libm.so.6
    006ab000-006ad0fb /lib/libdl.so.2
    00550000-006a2723 /lib/libc.so.6
    00531000-0054b4f7 /lib/ld-linux.so.2
    b7c66000-b7ebfea7 */usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/jrockit/libjvm.so
    007a3000-007a9ebf /lib/librt.so.1
    b724f000-b725839b /lib/libnss_files.so.2
    b7138000-b71429bb /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libverify.so
    b7113000-b7135f57 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libjava.so
    007ae000-007c27a7 /lib/libnsl.so.1
    b725e000-b7263ef0 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/native_threads/libhpi.so
    b5972000-b59803e4 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libzip.so
    b5803000-b5808666 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libmanagement.so
    b51a8000-b51baa18 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libnet.so
    b725c000-b725c6ad /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/librmi.so
    b2dae000-b2db1c2f /lib/libnss_dns.so.2
    b2d9a000-b2da974b /lib/libresolv.so.2
    b47ae000-b47b43a4 /usr/local/jrmc-3.1.2-1.6.0/jre/lib/i386/libnio.so
    b1ec7000-b1eef857 /usr/local/springsource/tcServer-6.0/zplus/temp/tmpSigarJars551489478996731294326116727652638760/libsigar-x86-linux-1.6.4.so
    Stack:
    (* marks the word pointed to by the stack pointer)
    02a97010: b7ec5040* 00000200 b7eb0de4 02a97078 02a97078 02a97034
    02a97028: 02a97048 b7e78894 00000044 b7eb0de4 02a97078 00000001
    02a97040: 02a970d0 02a97110 02a97068 b7e788bf 00000044 b7eb0de4
    02a97058: 02a97078 b666692a 00000001 02a970d0 02a97088 b7e2147a
    Code:
    (* marks the word pointed to by the instruction pointer)
    b7cfca14: 4c892074 458b0824 2404c710 b7ec5040 0c244489 000200b8
    b7cfca2c: 24448900 b5dae804 01b80017 a3000000 b7ec5024 001267b8
    b7cfca44: 0000a300* 04c70000 00003f24 bdcae800 768d0017 27bc8d00
    b7cfca5c: 00000000 e589fc55 53c03157 b9e87d8d 00000004 00c0ec81
    "tomcat-http--119" id=24059 idx=0x60c tid=8771 lastJavaFrame=0xfffffffc
    Stack 0: start=0x2a74000, end=0x2a98000, guards=0x2a79000 (ok), forbidden=0x2a77000
    Thread Stack Trace:
    at dumpForceDump+117()@0xb7cfca45
    at vmFatalErrorMsgV+84()@0xb7e78894
    at vmFatalErrorMsg+31()@0xb7e788bf
    at fatalError+42()@0xb7e2147a
    at refIterInit+111()@0xb7e215bf
    at trProcessLocksForThread+41()@0xb7e300f9
    at get_all_locks+106()@0xb7d476ca
    at javaLockConvertLazyToThin+99()@0xb7d477b3
    at javaLockUnmatchedLock+802()@0xb7d488f2
    at jniMonitorEnter+48()@0xb7d66cf0
    at vmtiDetachFromThreadObject+85()@0xb7d9ec85
    at tsiThreadStub+147()@0xb7d9f0f3
    at ptiThreadStub+18()@0xb7e0e1d2
    at start_thread+226()@0x759832
    at __clone+94()@0x62245e
    -- Java stack --

    From the command-line (-Dehcache.monitor.enabled=True) you are using some form of caching.
    The out-of-memory occured as the JVM was unable the allocate an object: C Heap : 1 memory allocations have failed
    Could you check how the live data set is going (or the memory leak detector)
    Some concerns with regard to tune a JVM that runs a cache can be found here: http://middlewaremagic.com/weblogic/?p=7083
    Note that the example given discusses Coherence, but can be adopted for another caching mechanism as well.

  • Create record variable that refers dynamic query assigned to a ref cursor?

    Hi ,
    Just explaining what I am trying to achieve:
    1) i have a hr.departments table that was loaded in hr schema on 1st oct 2012 with 4 columns(department_id, department_name, manager_id, location_id)
    2) now I have a new schema by my name 'rahul' and I have loaded departments table but now an additional column has come into picture,ie created_date, this table got loaded on 1st-Nov-2012
    3) Now going forward my columns could be dropped from the departments table (it can be a case), for example might be my departments table in my schema 'rahul' one day could comprise of only 3 columns(department_id,department_name,manager_id)
    4) Now in the next step, I have managed to extract common column names(in a single line where columns are delimited using a comma) from both the tables(hr.departments and rahul.departments) which are (department_id, department_name, manager_id, location_id) using all_tab_cols table and I have written a function for it which i will be pasting below.
    5) now going forward, using the above column names line with column names delimited using comma, I have used a ref cursor and assigned a query to it using the line of columns that I have extracted from the above point
    6) Now I want to create a record variable which refers to my ref cursor, something like we do when we create a record variable by reffering to an explicit cursor defination that we give in the declaration block.
    PS:
    1) I have been out of touch with plsql for a long time so I have lost a lot of mmeory regarding plsql.
    2) basically I need to compare data in hr.departments table with rahul.departments table for only columns that are common to both the tables, rest new or discarded columns information will go in one of the log tables that I have created(this is done already)
    Please help me, I did try searching on google for the same but it really confused me very badly, any kind of help is appreciated, please find my code below:
    Regards
    Rahul
    Code :
    ===================================================================================================
    create or replace procedure p_compare_data(fp_old_table_name in varchar2, fp_new_table_name in varchar2)
    is
    type ref_cursor_old_table is ref cursor;
    v_ref_cursor_old_table ref_cursor_old_table;
    --record_v_ref_cursor_old_table v_ref_cursor_old_table;
    --record_ref_cursor_old_table v_ref_cursor_old_table%ROWTYPE;
    Lv_all_column_names varchar2(2000);
    function f_fetch_common_column_names(fp_old_table_name in varchar2, fp_new_table_name in varchar2)
    return varchar2
    is
              Lv_all_column_names varchar2(2000);
    begin
              execute immediate 'select ltrim(all_column_names,'','') all_column_names_in_line from (select * from (select sys_connect_by_path(hr_e_column_name,'','') all_column_names from (select hr_e_column_name, rownum curr, rownum - 1 prev from (select hr_e.* , rahul_e.* , case when (hr_e_column_name = rahul_e_column_name) then 1 when (rahul_e_column_name is NULL) then 2 when (hr_e_column_name is NULL) then 3 end decision from (select column_name hr_e_column_name from all_tab_cols where owner ='''||substr(fp_old_table_name,1,instr(fp_old_table_name,'.',1,1)-1)||''' and table_name = '''||substr(fp_old_table_name,instr(fp_old_table_name,'.',1,1)+1)||''') hr_e full outer join (select column_name rahul_e_column_name from all_tab_cols where owner = '''||substr(fp_new_table_name,1,instr(fp_new_table_name,'.',1,1)-1)||''' and table_name = '''||substr(fp_new_table_name,instr(fp_new_table_name,'.',1,1)+1)||''') rahul_e on hr_e.hr_e_column_name = rahul_e.rahul_e_column_name) decision_table where decision = 1) a start with a.curr = 1 connect by prior curr = prev) b order by length(b.all_column_names) desc) all_column_names_in_line where rownum = 1' into Lv_all_column_names;
              return (Lv_all_column_names);
    end;
    begin
         Lv_all_column_names := f_fetch_common_column_names(fp_old_table_name, fp_new_table_name);
         --dbms_output.put_line(Lv_all_column_names);
         open v_ref_cursor_old_table for ('select '||Lv_all_column_names||' from '||fp_old_table_name);
    end;
    =====================================================================================================

    >
    6) Now I want to create a record variable which refers to my ref cursor, something like we do when we create a record variable by reffering to an explicit cursor defination that we give in the declaration block.
    >
    This thread is basically nothing more than a continuation of your original thread except now you are finally explaining what you are really trying to do.
    Re: passing table name to a procedure and then need to open a cursor ..
    In that original thread you said you found the solution
    >
    Well Mate thanks for your suggestion but I got it working through ref cusror, thanks for your time.
    >
    So I ask you to post your 'solution' and when you finally did it was clear that you hadn't solved anything at all. Your solution used a ref cursor all right but the code relied on a record ('record_employees') that was based on a table name ('employees') that was declared within the procedure. There isn't much point in passing in a table name if you have to hard-code the table name in the procedure.
    create or replace procedure p_ref_cursor(fp_old_table in varchar2)
    is
    type ref_cursor is REF CURSOR;
    v_ref_cursor ref_cursor;
    record_employees hr.employees%ROWTYPE;
    begin
    open v_ref_cursor for 'select * from '||fp_old_table;
    loop
    fetch v_ref_cursor into record_employees;
    exit when v_ref_cursor%NOTFOUND;
    dbms_output.put_line(record_employees.employee_id);
    end loop;
    end;Then sb92075 ask you the question that illustrates what I just said
    >
    what happens when you pass in "HR.DEPARTMENTS" ; besides throwing errors?
    >
    And you blew him off with this
    >
    Mate, departments never came in my context, in my prior message I explained what I was trying to achieve ... so I dont know what problem you are understanding reading my posts.
    >
    And now here you are asking how to get this to work for the departments table.
    It is very difficult to help someone that won't tell us what it is they are really trying to do so we can try to suggest some better ways of doing it. Hopefully, in the future, you wil start by explaining your problems instead of focusing on the solution you think you should use.
    Back to the issue -
    The first thing you should do is finish defining the requirements. Assuming the above actually works to identify columns that have different data what are you going to do with that information?
    1. Do you need to save that different data from TABLE1 somewhere?
    2. If you don't save it how will anyone look at it to decide which table has the correct data?
    3. If you do save it how will you save it 'generically' since other tables will have different columns and datatypes?
    4. What about the data from the same record in TABLE2; do you need to save that data somewhere?
    5. Will these two tables have primary keys? Are they on the same columns in each table? If not what if TABLE1 has one record but there are TWO records in TABLE2 that are identical. Is that a match? Or is that a problem because TABLE2 has an extra record even though the record is identical?
    In short detecting the differences is just one small part of the entire problem. You also need to save those differences somewhere so someone can examine the data and decide what action to take. That is the more difficult part of trying to implement a 'generic' solution.
    But now that we know what you are really trying to do take a read through this thread from 6 years ago. It has three different ways to pass a query to a procedure and get different output. You may want to save a copy of the thread since it has some very advanced techniques in it.
    How to pipeline a function with a dynamic number of columns?
    See ascheffer's reply Posted: May 9, 2006 4:53 AM for using data cartridge functionality with a pipelined function.
    See Kamal's reply Posted: May 10, 2006 4:49 AM - it shows how to get XML output.
    See BluShadow's reply Posted: Mar 27, 2009 1:50 AM - for using dynamic sql

Maybe you are looking for

  • ANY hope for "moisture damage"??

    A couple months ago - my phone got wet - and I took it in-guy cleaned it up and I was good to go.  Then last week, it started acting up - husband took it in and she said she had to do a "hard reset" before she could order me a new phone.  I hadn't sy

  • How to add space before a string a variable.

    Hi, If i have a string variable  ' 80 '.I want it as '    80 ' ie some space appended before it. I used  concatenate '   '    variable into variable..Its not working.How to do it?? Thanks.

  • Xml namespace and xslt

    Hi, This is a pure xml question. Let me know if there are good forums better suited for this kind of problem. I receive an xml message with the following format: <?xml version="1.0" encoding="ISO-8859-1" ?> <staticMessage xmlns="Static/nme" xmlns:xsi

  • Multi-line Address With Blank Line

    Using the multiline address and the input conforms to the guidelines. 1.     [Name]  [Department] 2.     Firm   [Department] 3.     [Dual_Address]   [Secondary_Address] 4.     Primary_Address   [Secondary_Address] 5.     CITY    STATE  ZIP  [ZIP+4] 

  • Newb Question: Creating overlays for an image

    I'm new to flash and am stuck on a project I'm working. Any help would be greatly appreciated. Essentially I'm trying to create a webpage with an image of a piece of furniture on one side of the page. On the other side I'm trying to create some digit