ORACLE ERROR ORA-32314: REFRESH FAST unsupported after deletes/updates

hi,
I have a materialized view created with fast refresh on demand option. Now when i try to refresh it manually the next day, it gives me an error . I have both count(*) and count(1) inside the materialized view. There is update and delete transactions done on most of the tables. The refresh is set to be at 4 am though a refresh group . But it fails with the error shown below . Please help. thanks
here is the script from toad
DROP MATERIALIZED VIEW MYPORTAL.ACCOUNT_COST_CATEGORY_MV;
CREATE MATERIALIZED VIEW MYPORTAL.ACCOUNT_COST_CATEGORY_MV
TABLESPACE USERS
PCTUSED    0
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
NOCACHE
LOGGING
NOCOMPRESS
NOPARALLEL
BUILD IMMEDIATE
USING INDEX
            TABLESPACE USERS
            PCTFREE    10
            INITRANS   2
            MAXTRANS   255
            STORAGE    (
                        INITIAL          64K
                        MINEXTENTS       1
                        MAXEXTENTS       UNLIMITED
                        PCTINCREASE      0
                        BUFFER_POOL      DEFAULT
REFRESH FAST ON DEMAND
WITH PRIMARY KEY
AS
/* Formatted on 2011/01/07 10:04 (Formatter Plus v4.8.8) */
SELECT   ac.account_id,
         ac.account_manager mgr_id,
         ac.account_number,
         ac.account_name,
         bc.burden_center_name burden_center,
         p.surname_isi || ', ' || p.first_name account_manager,
         p.division_id,
         item.code_id,
         item.code_name cost_category_item,
         TO_NUMBER (TO_CHAR (ap.first_day, 'YYYY')) period_year,
         ap.first_day period,
         ap.fiscal_system_period_cal_yr_eq || ', ' || ap.fiscal_year period_asr,
         COUNT (*) total_row_count,
         COUNT (1) total_one_count,
         SUM (NVL (ad.current_expense, 0)) expense,
         SUM (NVL (ad.total_budget, 0)) budget,
         SUM (NVL (ad.cumltv_expense, 0)) cumltv_expense,
         SUM (NVL (ad.commitments, 0)) commitments,
         SUM (NVL (ad.budget_balance, 0)) budget_balance
    FROM accounts ac,
         burden_centers bc,
         personnel p,
         asr_headers ah,
         asr_details ad,
         codes item,
         codes costcat,
         all_periods ap,
         codes cost_element,
         accounting_base_group abg
   WHERE ac.account_manager = p.personnel_id
     AND ac.burden_center_id = bc.burden_center_id
     AND ac.account_id = ah.account_id
     AND ah.asr_header_id = ad.asr_header_id
     AND ah.period_asr =
                   ap.fiscal_system_period_cal_yr_eq || ', ' || ap.fiscal_year
     AND abg.cost_element_cat_item_id = item.code_id
     AND cost_element.code_id = abg.cost_element_id
     AND ad.object_code = cost_element.code_value
     AND item.code_parent_id = costcat.code_id
     AND (   costcat.code_name = 'Report 1'
          OR (costcat.code_name = 'Base' AND item.code_name = 'MTDC')
GROUP BY ac.account_id,
         ac.account_manager,
         ac.account_number,
         ac.account_name,
         bc.burden_center_name,
         p.surname_isi || ', ' || p.first_name,
         p.division_id,
         item.code_id,
         item.code_name,
         TO_NUMBER (TO_CHAR (ap.first_day, 'YYYY')),
         ap.first_day,
         ap.fiscal_system_period_cal_yr_eq || ', ' || ap.fiscal_year;
COMMENT ON MATERIALIZED VIEW MYPORTAL.ACCOUNT_COST_CATEGORY_MV IS 'snapshot table for snapshot MYPORTAL.ACCOUNT_COST_CATEGORY_MV';
CREATE INDEX MYPORTAL.ACCOUNT_COST_CAT_MV_IDX ON MYPORTAL.ACCOUNT_COST_CATEGORY_MV
(ACCOUNT_ID, CODE_ID, PERIOD)
LOGGING
TABLESPACE USERS
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
NOPARALLEL;
-- Note: Index I_SNAP$_ACCOUNT_COST_CATEG will be created automatically
--       by Oracle with the associated materialized view.
here is the error :
10:10:04 SQL>  exec dbms_mview.refresh('account_cost_category_mv');
BEGIN dbms_mview.refresh('account_cost_category_mv'); END;
ERROR at line 1:
ORA-32314: REFRESH FAST of "MYPORTAL"."ACCOUNT_COST_CATEGORY_MV" unsupported after deletes/updates
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2254
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2460
ORA-06512: at "SYS.DBMS_SNAPSHOT", line 2429
ORA-06512: at line 1
10:10:14 SQL>

Check out the error cause and action:
ORA-32314: REFRESH FAST of "string"."string" unsupported after deletes/updates
Cause:      One or more deletes or updates has been performed on one or more of the detail tables referenced by the specified materialized view. This materialized view does not support fast refresh after deletes or updates.
Action:      Use REFRESH COMPLETE. Note: you can determine why your materialized view does not support fast refresh after deletes or updates using the DBMS_MVIEW.EXPLAIN_MVIEW() API.

Similar Messages

  • Using PreparedStatement and the Oracle Error ORA-1000

    Hi,
    I have a question about PreparedStatement objects that is not so simple to explain for me. What I would like to know is: if I use a PreparedStatement following traditional and generic steps:
    1- PreparedStatement pStmt = Connection.prepareStatement(sQuery);
    2- pStmt.setXXX(i,j);
    n - pStmt.setXXX(i,j);
    n+1 - ResultSet rs = pStmt.executeQuery();
    n+2 - while(rs.next()){ ... retrive ResultSet data  ... }
    n+3 - rs.close()
    n+4 - back to point number 2
    and at the end (as you can see in the point numbered n+4), instead of closing the PreparedStatement pStmt using the close() method, I reuse the PreparedStatement pStmt comeing back to the point numebr 2 and setting again all its parameters with new values ... then ... what heppens in the Oracle database ? Has been the cursor (so the mamory area), associated to my PreparedStatement object pStmt, duplicated or is it the same ?
    I know that Java allows you to do this kind of operations with PreparedStatement, and I know that in tha Java Documentation is explained to follow this strategy to optimize the execution time because in this way the same PreparedStatement is precompiled and prepared only once. But if I do a for loop following the steps explained before, after many iterations I have the error "ORA-1000: maximum open cursors exceeded". This error is the reason of my question. Does this error means that it's mandatory to close a PreparedStatement always, otherwise if you reuse it without closing it then the corresponding database cursor will be duplicated ? If it is so, then I think this is a contradiction with official java documentation ...
    I'm using Oracle8i (version 8.1.7) and Oracle JDBC Thin Driver (Windows NT) for use with JDK 1.2.x. Moreover, in my database istance the parameter "maximum open cursor" is equal to 800 ...
    Thank you very much for suggestions :-)

    There is no need to close a prepared statement or its resultset for every iteration.
    After the first iteration in a loop, all subsequent executions of it will close the previous resultset. By adding close() method, you are making one extra costly call to the DB for no reason.
    Following is the sample code.I know what you are saying. In fact at the beginning I wrote my code in the same way of your sample (see the code of my first post at the begin of this page).
    But doing so, after thousand iterations of the loop, I had "Oracle Error ORA-1000 : maximun open cursor exeeded" even if in my database istance the parameter "maximum open cursor" is equal to 8000.
    At this moment in my code, for each iteration, I close the PreparedStatement and in this way I don't have anymore the error :-((
    So it seems that only in theory we can reuse a preparedStatement without closing it. In fact if we see the oracle system table "$open_cursor" (as Konrad Pietzka suggest me) we can find that, for each interation,
    at our line code "rs = pstmt.executeQuery();" correspond a new cursor in the database: this means that for each method "pstmt.executeQuery()" the database open a new cursor and do not use the previous one as it should.
    I posted a question two months ago to search if someone had the same problem (it seems that Konrad Pietzka had the same situation) and was able to explain me what is the cause.
    The only reason I found by myself for this problem, is that probably the Oracle JDBC Thin Driver for Windows NT/2000 has some bugs... but I'm not sure ...
    Thank you very much for you time !!
    bye :-))
    Fidalma

  • Oracle error ORA-01461when trying to insert into an ORACLE BLOB field

    I am getting Oracle error ‘ORA-01461: can bind a LONG value only  for insert into a LONG column' when trying to insert into an ORACLE BLOB field. The error occurs when trying to insert a large BLOB (JPG), but does not occur when inserting a small (<1K) picture BLOB.(JPG). Any ideas?
    BTW, when using a SQL Server datasource using the same code.... everything works with no problems.
    ORACLE version is 11.2.0.1
    The ORACLE datasource is JDBC using Oracle's JDBC driver ojdbc6.jar v11.2.0.1 (I also have tried ojdbc5.jar v11.2.0.1; ojdbc5.jar v11.2.0.4; and ojdbc6.jar v11.2.0.4 with the same error result.)
    Here is my code:
    <cfset file_mime = Lcase(Right(postedXMLRoot.objname.XmlText, 3))>
    <cfif file_mime EQ 'jpg'><cfset file_mime = 'jpeg'></cfif>
    <cfset file_mime = 'data:image/' & file_mime & ';base64,'>
    <cfset image64 = ImageReadBase64("#file_mime##postedXMLRoot.objbase64.XmlText#")>
    <cfset ramfile = "ram://" & postedXMLRoot.objname.XmlText>
    <cfimage action="write" source="#image64#" destination="#ramfile#" overwrite="true">
    <cffile action="readbinary" file="#ramfile#" variable="image_bin">
    <cffile action="delete" file="#ramfile#">
    <cfquery name="InsertImage" datasource="#datasource#">
    INSERT INTO test_images
    image_blob
    SELECT
    <cfqueryparam value="#image_bin#" cfsqltype="CF_SQL_BLOB">
    FROM          dual
    </cfquery>

    Can't you use "alter index <shema.spatial_index_name> rebuild ONLINE" ? Thanks. I could switch to "rebuild ONLINE" and see if that helps. Are there any potential adverse effects going forward, e.g. significantly longer rebuild than not using the ONLINE keyword, etc? Also wondering if spatial index operations (index type = DOMAIN) obey all the typical things you'd expect with "regular" indexes, e.g. B-TREE, etc.

  • Oracle Error :: ORA-12637 Packet receive failed

    Hi buddies,
    One of my staff's PC is receiving this error sometimes when she is trying to connect to the database and she is able to connect sometimes.
    Oracle Error :: ORA-12637 Packet receive failed What could be the cause.
    I tried replacing her tnsadmin with my tnsadmin and it didn't make a change, still able to connnect sometimes and sometimes not.
    Able to connect using PL/SQL developer, but not using our customized application. (Everyone else are able to connect)
    Is it network problem?
    Please advice.
    Thank You very much.
    Alagu
    Edited by: user645399 on Sep 16, 2009 8:37 PM

    And from this cut-and-paste the OP is supposed to take what actions to solve the problem? Please don't just post that which is one google away every time someone posts an ORA- exception. You make some valuable contributions here but just posting expanded text doesn't give someone a list of actions to take that will help them resolve the issue. Better the question is left unanswered so others will be more likely to offer help.
    To the OP:
    It is highly likely you have a network issue and the fact that it is isolated to a single machine makes it reasonably easy to fix. First try to figure out which component is failing. Go to the router or switch and swap wires between that client machine and another one that is working properly. Does the problem move? If not then swap the wires. Again does the problem move? Next the NIC card? What if you put another machine on the desk and put the original hard disk in it?
    Sometimes it just isn't worth the effort so you just swap out the machine.
    Intermittent problems are always hard to identify and fix. What is on your side is that this is only affecting a single user.

  • Urgent-Oracle Error :: ORA-39778-

    Hi
    I got following Oracle Error : ORA-39778 "the parallel load option is not allowed when loading lob columns" on production. yesterday we updated database with patchset 9.2.0.7 and DST/JVM compliant.
    Please reply me ASAP.
    Regards,
    RJ

    Sry I didn't check back this afternoon.
    As posted,
    Here's the note from metalink doc Note:396387.1
    Then e this to apply the files manually in the following way:
    Download the identified patch.
    Unzip the patch, and locate the 2 files timezone.dat and timezlrg.dat in the "files/oracore/zoneinfo" directory of the uncompressed patch (or from the relevant .jar file of a patchset). If there is also a readme.txt in this location then make a note of this as well.
    Backup your existing files in $ORACLE_HOME/oracore/zoneinfo - THIS CAN BE VITAL, DO NOT SKIP.
    Copy the 2 .dat files and possibly the readme.txt file that were found in step 2 into the $ORACLE_HOME/oracore/zoneinfo directory.
    Restart the database (in case of installation on a database), or restart the client applications (in case of client install). Note that the database did not need to be down before the time zone files were applied, but it does need to be restarted afterwards.

  • Oracle error ORA-22905: cannot access rows from a non-nested table item

    Oracle error ORA-22905: cannot access rows from a non-nested table item
    Creating a report using oracle plsql code .
    Getting error ;
    Oracle error ORA-22905: cannot access rows from a non-nested table item
    when I am trying to pass data in clause in pl sql proc
    basically I have a proc which takes 2 parameters(a and b)
    proc (
    P_a varchar2,
    p_b varchar2,
    OUT SYS_REFCURSOR
    culprit code which is giving me  the error and on google they say cast it but I dont know how to do it in my context
    --where  id in (
    --        SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_a) FROM dual)
    --        union
    --        SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_b) FROM dual)
    data sample returned from this :SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_a) FROM dual)
    'Abc','def',
    data sample returned from this;SELECT * FROM THE (SELECT p_cd_common.get_table_from_string(P_b) FROM dual)
    'fgd','fth',
    Any answers ?
    How to pass data in clause in a better way

    Why are you creating a duplicate post? I already asked you to post p_cd_common.get_table_from_string. In particular what is function return type and where it is declared. As I already mentioned, most likely function return type is declared in the package and therefore is PL/SQL type. And TABLE operator can only work with SQL types.
    SY.

  • APP-DT-34605:Oracle error ORA-4098 occured while writing to PER_ALL_ASSIGNM

    We have Upgraded DB from 10.2.0.2 to 10.2.0.5 having same Apps version 11.5.10.2,
    we have seen below issue upon upgrade,
    While updating any information in Assignment i.e. Assignment Status getting following error.
    APP-DT-34605:Oracle error ORA-4098 occured while writing to PER_ALL_ASSIGNMENTS_F
    How to overcome these errors, please advise,
    RM

    Please see these docs.
    PERWSHRG: Updating Assignment Gives Error APP-DT-34605 ORA-6510 [ID 286294.1]
    Update Employee Assignment Details Cause Error: APP-DT-34605-- ORA-20001 occurred writing to PER_ALL_ASSIGNMENTS_F [ID 793451.1]
    APP-DT-34605 Error When Saving on Assignment Form [ID 829292.1]
    Receive APP-DT-34605 Error When Updating an Existing Payment Method [ID 780090.1]
    ORA-06508 PL/SQL Could Not Find Program Unit Being Called: "APPS.PAY_PAY_SHD" [ID 1170903.1]
    Thanks,
    Hussein

  • 3014 error i can't restore ipad after firmware update attempt

    3014 error i can't restore ipad after firmware update attempt

    See this thread with the same question.
    https://discussions.apple.com/thread/5045573?tstart=0

  • ORA-01456 : may not perform insert/delete/update operation

    When I use following stored procedure with crystal reports, following error occurs.
    ORA-01456 : may not perform insert/delete/update operation inside a READ ONLY transaction
    Kindly help me on this, please.
    My stored procedure is as under:-
    create or replace
    PROCEDURE PROC_FIFO
    (CV IN OUT TB_DATA.CV_TYPE,FDATE1 DATE, FDATE2 DATE,
    MSHOLD_CODE IN NUMBER,SHARE_ACCNO IN VARCHAR)
    IS
    --DECLARE VARIABLES
    V_QTY NUMBER(10):=0;
    V_RATE NUMBER(10,2):=0;
    V_AMOUNT NUMBER(12,2):=0;
    V_DATE DATE:=NULL;
    --DECLARE CURSORS
    CURSOR P1 IS
    SELECT *
    FROM FIFO
    WHERE SHARE_TYPE IN ('P','B','R')
    ORDER BY VOUCHER_DATE,
    CASE WHEN SHARE_TYPE='P' THEN 1
    ELSE
    CASE WHEN SHARE_TYPE='R' THEN 2
    ELSE
    CASE WHEN SHARE_TYPE='B' THEN 3
    END
    END
    END,
    TRANS_NO;
    RECP P1%ROWTYPE;
    CURSOR S1 IS
    SELECT * FROM FIFO
    WHERE SHARE_TYPE='S'
    AND TRANS_COST IS NULL
    ORDER BY VOUCHER_DATE,TRANS_NO;
    RECS S1%ROWTYPE;
    --BEGIN QUERIES
    BEGIN
    DELETE FROM FIFO;
    --OPENING BALANCES
    INSERT INTO FIFO
    VOUCHER_NO,VOUCHER_TYPE,VOUCHER_DATE,TRANS_QTY,TRANS_AMT,TRANS_RATE,
    SHOLD_CODE,SHARE_TYPE,ACC_NO,SHARE_CODE,TRANS_NO)
    SELECT TO_CHAR(FDATE1,'YYYYMM')||'001' VOUCHER_NO,'OP' VOUCHER_TYPE,
    FDATE1-1 VOUCHER_DATE,
    SUM(
    CASE WHEN
    --((SHARE_TYPE ='S' AND DTAG='Y')
    SHARE_TYPE IN ('P','B','R','S') THEN
    TRANS_QTY
    ELSE
    0
    END
    ) TRANS_QTY,
    SUM(TRANS_AMT),
    NVL(CASE WHEN SUM(TRANS_AMT)<>0
    AND
    SUM
    CASE WHEN SHARE_TYPE IN ('P','B','R','S') THEN
    TRANS_QTY
    ELSE
    0
    END
    )<>0 THEN
    SUM(TRANS_AMT)/
    SUM
    CASE WHEN SHARE_TYPE IN ('P','B','R','S') THEN
    TRANS_QTY
    ELSE
    0
    END
    ) END,0) TRANS_RATE,
    MSHOLD_CODE SHOLD_CODE,'P' SHARE_TYPE,SHARE_ACCNO ACC_NO,
    SHARE_CODE,0 TRANS_NO
    FROM TRANS
    WHERE ACC_NO=SHARE_ACCNO
    AND SHOLD_CODE= MSHOLD_CODE
    AND VOUCHER_DATE<FDATE1
    --AND
    --(SHARE_TYPE='S' AND DTAG='Y')
    --OR SHARE_TYPE IN ('P','R','B'))
    group by TO_CHAR(FDATE1,'YYYYMM')||'001', MSHOLD_CODE,SHARE_ACCNO, SHARE_CODE;
    COMMIT;
    --TRANSACTIONS BETWEEND DATES
    INSERT INTO FIFO
    TRANS_NO,VOUCHER_NO,VOUCHER_TYPE,
    VOUCHER_DATE,TRANS_QTY,
    TRANS_RATE,TRANS_AMT,SHOLD_CODE,SHARE_CODE,ACC_NO,
    DTAG,TRANS_COST,SHARE_TYPE
    SELECT TRANS_NO,VOUCHER_NO,VOUCHER_TYPE,
    VOUCHER_DATE,TRANS_QTY,
    CASE WHEN SHARE_TYPE='S' THEN
    NVL(TRANS_RATE-COMM_PER_SHARE,0)
    ELSE
    NVL(TRANS_RATE+COMM_PER_SHARE,0)
    END
    ,TRANS_AMT,SHOLD_CODE,SHARE_CODE,ACC_NO,
    DTAG,NULL TRANS_COST,SHARE_TYPE
    FROM TRANS
    WHERE ACC_NO=SHARE_ACCNO
    AND SHOLD_CODE= MSHOLD_CODE
    AND VOUCHER_DATE BETWEEN FDATE1 AND FDATE2
    AND
    ((SHARE_TYPE='S' AND DTAG='Y')
    OR SHARE_TYPE IN ('P','R','B'));
    COMMIT;
    --PURCHASE CURSOR
    IF P1%ISOPEN THEN
    CLOSE P1;
    END IF;
    OPEN P1;
    LOOP
    FETCH P1 INTO RECP;
    V_QTY:=RECP.TRANS_QTY;
    V_RATE:=RECP.TRANS_RATE;
    V_DATE:=RECP.VOUCHER_DATE;
    dbms_output.put_line('V_RATE OPENING:'||V_RATE);
    dbms_output.put_line('OP.QTY2:'||V_QTY);
    EXIT WHEN P1%NOTFOUND;
    --SALES CURSOR
    IF S1%ISOPEN THEN
    CLOSE S1;
    END IF;
    OPEN S1;
    LOOP
    FETCH S1 INTO RECS;
    EXIT WHEN S1%NOTFOUND;
    dbms_output.put_line('OP.QTY:'||V_QTY);
    dbms_output.put_line('SOLD:'||RECS.TRANS_QTY);
    dbms_output.put_line('TRANS_NO:'||RECS.TRANS_NO);
    dbms_output.put_line('TRANS_NO:'||RECS.TRANS_NO);
    IF ABS(RECS.TRANS_QTY)<=V_QTY
    AND V_QTY<>0
    AND RECS.TRANS_COST IS NULL THEN
    --IF RECS.TRANS_COST IS NULL THEN
    --dbms_output.put_line('SOLD:'||RECS.TRANS_QTY);
    --dbms_output.put_line('BAL1:'||V_QTY);
    UPDATE FIFO
    SET TRANS_COST=V_RATE,
    PUR_DATE=V_DATE
    WHERE TRANS_NO=RECS.TRANS_NO
    AND TRANS_COST IS NULL;
    COMMIT;
    dbms_output.put_line('UPDATE TRANS_NO:'||RECS.TRANS_NO);
    dbms_output.put_line('OP.QTY:'||V_QTY);
    dbms_output.put_line('SOLD:'||RECS.TRANS_QTY);
    dbms_output.put_line('TRANS_NO:'||RECS.TRANS_NO);
    dbms_output.put_line('BAL2:'||TO_CHAR(RECS.TRANS_QTY+V_QTY));
    END IF;
    IF ABS(RECS.TRANS_QTY)>ABS(V_QTY)
    AND V_QTY<>0 AND RECS.TRANS_COST IS NULL THEN
    UPDATE FIFO
    SET
    TRANS_QTY=-V_QTY,
    TRANS_COST=V_RATE,
    TRANS_AMT=ROUND(V_QTY*V_RATE,2),
    PUR_DATE=V_DATE
    WHERE TRANS_NO=RECS.TRANS_NO;
    --AND TRANS_COST IS NULL;
    COMMIT;
    dbms_output.put_line('UPDATING 100000:'||TO_CHAR(V_QTY));
    dbms_output.put_line('UPDATING 100000 TRANS_NO:'||TO_CHAR(RECS.TRANS_NO));
    INSERT INTO FIFO
    TRANS_NO,VOUCHER_NO,VOUCHER_TYPE,
    VOUCHER_DATE,TRANS_QTY,
    TRANS_RATE,TRANS_AMT,SHOLD_CODE,SHARE_CODE,ACC_NO,
    DTAG,TRANS_COST,SHARE_TYPE,PUR_DATE
    VALUES
    MCL.NEXTVAL,RECS.VOUCHER_NO,RECS.VOUCHER_TYPE,
    RECS.VOUCHER_DATE,RECS.TRANS_QTY+V_QTY,
    RECS.TRANS_RATE,(RECS.TRANS_QTY+V_QTY)*RECS.TRANS_RATE,RECS.SHOLD_CODE,
    RECS.SHARE_CODE,RECS.ACC_NO,
    RECS.DTAG,NULL,'S',V_DATE
    dbms_output.put_line('INSERTED RECS.QTY:'||TO_CHAR(RECS.TRANS_QTY));
    dbms_output.put_line('INSERTED QTY:'||TO_CHAR(RECS.TRANS_QTY+V_QTY));
    dbms_output.put_line('INSERTED V_QTY:'||TO_CHAR(V_QTY));
    dbms_output.put_line('INSERTED RATE:'||TO_CHAR(V_RATE));
    COMMIT;
    V_QTY:=0;
    V_RATE:=0;
    EXIT;
    END IF;
    IF V_QTY>0 THEN
    V_QTY:=V_QTY+RECS.TRANS_QTY;
    ELSE
    V_QTY:=0;
    V_RATE:=0;
    EXIT;
    END IF;
    --dbms_output.put_line('BAL3:'||V_QTY);
    END LOOP;
    V_QTY:=0;
    V_RATE:=0;
    END LOOP;
    CLOSE S1;
    CLOSE P1;
    OPEN CV FOR
    SELECT TRANS_NO,VOUCHER_NO,VOUCHER_TYPE,
    VOUCHER_DATE,TRANS_QTY,
    TRANS_RATE,TRANS_AMT,SHOLD_CODE,B.SHARE_CODE,B.ACC_NO,
    DTAG,TRANS_COST,SHARE_TYPE, B.SHARE_NAME,A.PUR_DATE
    FROM FIFO A, SHARES B
    WHERE A.SHARE_CODE=B.SHARE_CODE
    --AND A.SHARE_TYPE IS NOT NULL
    ORDER BY VOUCHER_DATE,SHARE_TYPE,TRANS_NO;
    END PROC_FIFO;
    Thanks and Regards,
    Luqman

    Copy from TODOEXPERTOS.COM
    Problem Description
    When running a RAM build you get the following error as seen in the RAM build
    log file:
    14:52:50 2> Updating warehouse tables with build information...
    Process Terminated In Error:
    [Oracle][ODBC][Ora]ORA-01456: may not perform insert/delete/update operation inside a READ ONLY transaction
    (SIGENG02) ([Oracle][ODBC][Ora]ORA-01456: may not perform insert/delete/update operation inside a READ ONLY transaction
    ) Please contact the administrator of your Oracle Express Server application.
    Solution Description
    Here are the following suggestions to try out:
    1. You may want to use oci instead of odbc for your RAM build, provided you
    are running an Oracle database. This is setup through the RAA (relational access
    administrator) maintenance procedure.
    Also make sure your tnsnames.ora file is setup correctly in either net80/admin
    or network/admin directory, to point to the correct instance of Oracle.
    2. Commit or rollback the current transaction, then retry running your
    RAM build. Seems like one or more of your lookup or fact tables have a
    read-only lock on them. This occurs if you modify or add some records to your
    lookup or fact tables but forget to issue a commit or rollback. You need to do
    this through SQL+.
    3. You may need to check what permissions has been given to the relational user.
    The error could be a permissions issue.
    You must give 'connect' permission or roll to the RAM/relational user. You may
    also try giving 'dba' and 'resource' priviliges/roll to this user as a test. Inorder to
    keep it simple, make sure all your lookup, fact and wh_ tables are created on
    a single new tablespace. Create a new user with the above privileges as the
    owner of the tablespace, as well as the owner of the lookup, fact and wh_
    tables, inorder to see if this is a permissions issue.
    In this particular case, the problem was resolved by using oci instead of odbc,
    as explained in suggestion# 1.

  • Oracle error ORA-01115

    when we run sql update we get the error ORA-01115 : IO eror reading from file 348 and
    ORA-01110 : data file 657 : /dev/vx/rdsk/racdg1/PSindex03 ORA-27072 : skgfdisp : I/O error SVR4 Error : 12 : not enough space.
    the database is working perfectly.
    the job runs perfectly when we re-run the job after several tries.
    i have checked the oracle documentation on error and causes.they have not helped me yet.
    please give your inputs.
    oracle 9i with RAC
    OS solaris

    1. Try to assess the cause and extent of the problem.
    Examine the alert.log file for this instance. Scan the last few
    days' entries for other occurrences of ORA-01115. If you find them,
    A) Do they reference files in different disks?
    If so, it is likely that there you have controller problems.
    Move on to Scenario II.A below.
    B) Do they reference different files in the same disk?
    If so, it is likely that there are problems with that disk.
    Move on to Scenario II.B below.
    C) Do they always reference the same datafile?
    If so, it is likely that the datafile contains bad blocks.
    Move on to Scenario II.C below. If the file is bigger
    than 2GB and you are running 7.1.4 or lower on a Solaris
    platform, see Scenario II.D below.
    D) If none of the above applies, move on to Step 2.
    2. If the datafile is in the SYSTEM tablespace, or the database is in
    NOARCHIVELOG mode, shut the database down. Move on to Step 4.
    If shutdown immediate fails, do a shutdown abort.
    3. If the database is in ARCHIVELOG mode, you should still shut the
    database down. If the database cannot be shut down, offline the
    datafile.
    ALTER DATABASE DATAFILE '<full_path_file_name>' OFFLINE;
    4. Try to copy the datafile to another disk (managed by a different
    controller, if possible).
    5. If the copy fails, even after you retry, the datafile must be considered
    lost at this point. The next action depends on the tablespace to
    which the lost file belongs. See the following Solution References to
    PR entries, according to the different types of tablespaces,
    for instructions on how to proceed.
    IMPORTANT: While going through the references below, keep in mind that
    if you restore the datafile from backup, you need to place it in another
    disk, preferably under a different controller, and rename it inside Oracle
    (see Note 115424.1 for details). If you recreate any tablespace, make
    sure its datafiles are created in another disk, preferably under a
    different controller.
    Reference for Lost datafile scenarios : Note 198640.1
    6. If the database is down, mount it.
    7. Rename the datafile that you succeeded in copying inside Oracle.
    ALTER DATABASE RENAME FILE '<old_full_path_file_name>'
    TO '<new_full_path_file_name>';
    8. If the database is mounted, open it. If you offlined the datafile,
    perform media recovery on it, and then bring it online.
    RECOVER DATAFILE '<full_path_file_name>';
    ALTER DATABASE DATAFILE '<full_path_file_name>' ONLINE;

  • Work around/Alternate solution for Oracle error  ORA-01460 and ORA-02063

    After the installation of Oracle.DataAccess version 2.111.7.20, I get the following error.(the code worked fine with Oracle.DataAccess version 9.2.0.700 )
    I have attached the error as well as the sample code.
    ORA-01460 and ORA-02063 are known bugs in the new ODP but would like to know if there is any Work around/Alternate solution for this problem(other than
    the use of stored procs)..
    Thanks!
    Error:
    ORA-01460: unimplemented or unreasonable conversion requested
    ORA-02063: preceding line from BSREAD_STAGINGRO at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck)
    at Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, String procedure, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, Boolean bCheck)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean requery, Boolean fillRequest, CommandBehavior behavior)
    at Oracle.DataAccess.Client.OracleCommand.ExecuteReader()
    SampleCode
    private bool isValidFieldData(string clientName, string fieldNumber, string uniqueID, string clientID)
    using (OracleConnection mBSConnection = new OracleConnection(mBSConnectionString))
    OracleDataReader oRdr = null;
    OracleCommand Valid_FieldData_Command = null;
    try
    Valid_FieldData_Command = new OracleCommand();
    Valid_FieldData_Command.Connection = mBSConnection;
    Valid_FieldData_Command.CommandText = "SELECT uniqueid FROM EXTDB.BSData WHERE agencyid = :agencyid and agencyname=:agencyname AND fieldnumber =:fieldnumber AND uniqueid = :uniqueid";
    Valid_FieldData_Command.Parameters.Add(":agencyid", OracleDbType.Varchar2, 255).Value = agencyID;
    Valid_FieldData_Command.Parameters.Add(":agencyname", OracleDbType.Varchar2, 255).Value = agencyName;
    Valid_FieldData_Command.Parameters.Add(":fieldnumber", OracleDbType.Varchar2, 255).Value = fieldNumber;
    Valid_FieldData_Command.Parameters.Add(":uniqueid", OracleDbType.Varchar2, 255).Value = uniqueID;
    mBSConnection.Open();
    oRdr = Valid_FieldData_Command.ExecuteReader(); ->Error occurs here
    The error occurs whenever the length of any of the parameter is increased. But there is no specific length where it is breaking down.
    For example in this case, it breaks down with the given error if
    agencyID > 8
    agencyName > 6
    fieldNumber > 9
    uniqueid > 6

    The problem was mapping input parameter type.
    VARCHAR2-type mapping input parameter works with String-type PF parameter. But CHAR-type won't.

  • ORACLE error ORA-04031: unable to allocate 16 bytes of memory

    Error
    UDI-04031: operation generated ORACLE error 4031
    ORA-04031: unable to allocate 16 bytes of shared memory ("shared pool","SELECT j
    generated during import operation, using documentation about migration from 10g XE to 11g XE.

    Hello,
    you could try to override the automatic memory management and setup your SGA to be larger by setting SGA_TARGET. If that doesn't help yet, you could even try to configure the memory size for the components in SGA manually, but I guess this won't be necessary.
    After your import is done, I'd recommend to use automatic memory management again.
    See the XE 2 Day DBA for details, especially the section on [url http://download.oracle.com/docs/cd/E17781_01/server.112/e18804/memory.htm#ADMQS174]Managing Memory. It's not a complete guide, but a rough introduction, but it'll probably help you understand the memory concepts in the database.
    Keep in mind that you may only assign 1 GB of memory in total when you setup your memory manually.
    -Udo

  • Getting Oracle error ORA-00000

    Hello All,
    After running the PRO*C file some times I am getting the error.( It happen some times not always)
    Error: You have encountered Oracle error #: 00000
    Steps: ORA-00000 is supposed to be a successful completion through...?
    Could any body suggest why I am getting this error?
    Welcome any suggestion.
    Regards
    SUN

    can you ask it in the rdbms or pro-c - forum?
    General Database Discussions

  • Oracle error ORA-604 when opening a connection

    I am facing an issue with my WCF service which is using ODP.NET version 4.112.2.0(x64) and Oracle 11g.
    The service runs without any problems on the test servers but on production server (Windows 2008 R2) when an attempt is made to call any service method it fails with the following Oracle error code Ora-604. the message is
    ORA-604: error occurred at recursive SQL level %s
    The exception is thrown when a call to meethod Open is made to open a connection.
    There is no inner exception. So far I have tried checking the connection string, the user permissions and setting the TNS_ADMIN environment variable but nothing has worked.
    Another thing to mention is that another WCF service which uses some of the same stored procedure I am using is working fine on the same server.
    Has anyone seen this before?
    Thanks,
    A

    Do you have a login trigger?
    select * from dba_triggers where triggering_event like 'LOGON%'
    If so, try disabling it.
    Does the working service use the same credentials as this problem service?
    Are you able to connect using sqlplus, with the same credentials from the same client to the same database? If it's not an ODP.NET specific problem, the dba guys might be able to help better: General Database Discussions
    Greg

  • Oracle error ORA-03113: end-of-file on communication channel

    Dear Support
    I am getting "ORA-03113: end-of-file on communication channel" when I am trying to access my application.
    The current setup is following
    - two node Sun Cluster with node name as sep1n1 and sep2n2
    - running Oracle RAC (oracle database 10g) with instance name as ADVFRW1 and ADVFRW2
    Please see attached oracle trace file which was generated at the time of problem.
    Can you please help me to know what can be the reason of this oracle error/crash?
    Thanks
    Regards
    VS

    I don't see any Trace file.
    Network Problems?
    Are the databases up and running?

Maybe you are looking for

  • How to show 1 value in chart

    Hi there! just want to ask how to show the value 1 in chart? Thank you in advance! Best Regards, Jef

  • Subcontracting Assembly Process

    Dear gurus, Just want to get guidance on the process flow of Subcontracting/Outsourcing Assembly.. Our org will still plan the requirements for the materials, inform the OEM (original equipment manufacturer), and supplying the components.. Thank you.

  • Data Level Security In Answers

    Hello Experts Can we configure data level security in answers and dashboards without using any variables ?? If so ..please guide me how to .. Thanks for your time . Edited by: newbi on Sep 13, 2010 2:14 PM Edited by: newbi on Sep 13, 2010 2:15 PM

  • Trying to buy more products

    Im tryin to buy unilimited products for the retail app called Ipo sales, i need the 5,000 or more products option and it wont let me buy. Tried to buy music and my account works fine. Tried 3 diferent credit cards and it doesnt accept apyment it says

  • Premiere Pro CC not terminating on exit

    Set-up:  3rd monitor playback driven by BM Intensity Pro through via PP preferences>playback. Every time I exit the PP CC application (ctl-Q), it does not shut down completely.  It has, by all intents and purposes, gone from the desktop, however it i