"ORA-24344: success with compilation error" in beginDDL

Hello,
I'm facing a really strange problem. When i try to use dbms_wm.beginDDL in one of my versioned tables, i get the error:
ORA-24344: success with compilation error
ORA-06512: "WMSYS.LT", line 12178
ORA-06512: line 2
I just get the error if i run the procedure from SQLPlus.
Using PLSQL Developer, for example, I get a normal execution but the LTS table it's not created and the state of the table stays 'VERSIONED'.
I used this procedure other times in the past and there were no problems.
Trying to identify the cause of the error, i've tried:
(1) - run dbms_wm.beginDDL for all the other tables - No Problem
(2) - verifiy if there were invalid objects - All valid
(3) - verify the error tables for more details (user_, dba_, user_wm_vt_) - No entries
(4) - generate a trace file, to search for abnormal executions - Apparently nothing really strange (but obviously I don't know what was supposed to happen)
Any possible reasons for this to happen?
Any ideas?
Some help would be welcome.
Best regards,
Pedro Lourenço

Hi Noel,
I just found the problem...
I have a trigger defined on the table that uses a synonym for another user table.
That synomym was dropped, so the trigger was invalid.
I didn't notice the problem because the trigger was disabled, so the WM$ procedure wasn't being generated, and there were no "visible errors".
Recreating the synomyn, the problem was solved.
Thanks for your help!
Regards,
Pedro Lourenço

Similar Messages

  • ORA-24344: Success with compilation error.

    Hi, i got the following error notification mail when the DB job [runs only once in a day at 1 AM] tries to execute the following procedure.
    The mail reads like this ----
    "Condition Raised in: toll_partitions.recompile_invalid_objects
    Short Desc: ORA-24344
    Long Desc: ORA-24344: Success with compilation error.
    Cause: Trigger creation did not successfully complete.
    Solution: Check trigger status for all triggers created in this schema and find out which error caused the failure by querying the user_errors table for the named trigger and Trigger type.
    --- end of mail ----
    === This is the procedure =====
    PROCEDURE recompile_invalid_objects IS
    -- Declare variables
    v_ins_str VARCHAR2(2000);
    cursor_handle NUMBER;
    execute_feedback NUMBER;
    v_unix_str VARCHAR2(200);
         v_object_cnt NUMBER := 0;
         -- Declare cursor objects
         CURSOR curs_obj IS
    SELECT decode( OBJECT_TYPE, 'PACKAGE BODY',
    'ALTER PACKAGE ' || OWNER||'.'||OBJECT_NAME || ' COMPILE BODY',
    'ALTER ' || OBJECT_TYPE || ' ' || OWNER||'.'||OBJECT_NAME || ' COMPILE' )
                   "COMP_OBJECT"
    FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
              AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
    BEGIN
         -- Set Package/Procedure Name for email notification.
         vFacility := cProcName || '.recompile_invalid_objects';
    -- Select invalid object count
    BEGIN
         SELECT count(*)
              INTO v_object_cnt
              FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
                   AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
              -- Recompile invalid objects
              IF v_object_cnt > 0 THEN
              FOR i in curs_obj
                   LOOP
                   v_ins_str := i.COMP_OBJECT;
                        cursor_handle := DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(cursor_handle,
         v_ins_str,
                   DBMS_SQL.V7);
    execute_feedback := DBMS_SQL.EXECUTE(cursor_handle);          
    DBMS_SQL.CLOSE_CURSOR(cursor_handle);
    COMMIT;
                   END LOOP;
              END IF;
    END;
    EXCEPTION
         WHEN OTHERS THEN
         -- Log error condition and generate email notification if needed.
    toll_handle.error_condition(vFacility, toll_handle.get_ora_desc(sqlerrm),vErrorID);
         END recompile_invalid_objects;
    ==== end of procedure ====
    I got '0' count when I ran the invalid object count to see the invalid objects. I ran the following code ..and it gave me 0 value.
    SELECT count(*)
              FROM dba_objects
    WHERE STATUS = 'INVALID'
    AND OBJECT_TYPE IN ( 'PACKAGE BODY', 'PACKAGE', 'FUNCTION', 'PROCEDURE',
              'TRIGGER', 'VIEW' )
    AND OWNER = USER
                   AND OBJECT_NAME NOT LIKE 'TOAD_PROFILER'
    ORDER BY OWNER, OBJECT_TYPE, OBJECT_NAME;
    --- end of query ---
    The count 0 means, there are no invalid objects. But it throws daily the same error notification mail at 1 AM[the time job runs]. I compiled the procedure and it reports no errors. I checked the status of the triggers and all are valid and enabled. Please suggest me. Any help in this regard will be of great help to me. Thanks in advance...

    Just some hints. I'm not sure if they help solving your problem.
    1) Don't COMMIT inside a cursor.
    2) Instead of DBMS_SQL you could use DBMS_DDL.ALTER_COMPILE, also see here: http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_ddl2.htm#1000604
    3) Check if there are other jobs running during the recompile. Maybe you run into some conflicts.
    4) Output the statement that creates the error. It looks like you could try to put this into your exception handler: toll_handle.error_condition(vFacility, v_ins_str,vErrorID);

  • ORA-24344: success with compilation error While creating workspace

    Hi,
    We had an instance with db 9.2.0.5 and HTML DB 1.56.
    First we upgraded database to to 10.1.0.4.Then we upgraded HTML DB to 1.6.1(Upgraded html db 1.5 to 1.6, Then applied patch 1.6.1 patch - 4173133)
    Logged to the HTML DB as an administrator for creating application developer's workspace. I have got the error "ORA-24344: success with compilation error" while creating the workspace.
    We are able to create the workspace successfully on HTML DB 1.5.
    Any help is highly appreciated.
    Thanks, Venkanna

    Venkanna - Do you think the workspace creation was at least partly successful? I mean, can you login to it, can you see anything about it in the admin app, etc.? It would be useful to get a list of invalid objects in the new workspace's schema. If there are none, then get a list of invalid objects in FLOWS_010600.
    Scott

  • "success with compilation error" ?

    Hopefully someone can shed light on this. Here is the sample code...
    SQL> create or replace procedure pr_TEST
    2 as
    3 begin
    4 execute immediate 'create or replace trigger tr_test after insert or update or delete on test
    for each row declare v_row test%rowtype; v_col1 varchar(32); v_col2 varchar(32); v_work varchar(32)
    ; begin insert into test values (v_col1, v_col2) ;end; /';
    5
    6 end;
    7 /
    Procedure created.
    SQL> exec pr_test;
    ERROR:
    ORA-24344: success with compilation error
    ORA-06512: at "ROOT.PR_TEST", line 4
    ORA-06512: at line 1
    Have you ever heard of an ORA-24344 ? Any suggestions on what to correct ?
    thx in advance,
    RP.

    You don't want the slash at the end of the string:
    sql>create or replace procedure pr_test
      2  as
      3  begin
      4   execute immediate 'create or replace trigger tr_test after insert or update or delete on test
      5  for each row declare v_row test%rowtype; v_col1 varchar(32); v_col2 varchar(32); v_work varchar
    (32);
      6   begin insert into test values (v_col1, v_col2) ;end;';  -- no slash here at end
      7  end;
      8  /
    Procedure created.

  • (SD 1.5.4.59.40) Compilation with coment - success with compilation error

    Hi!
    If I run this script:
    create table t(n number);
    create or replace
    TRIGGER t1
    -- Coment wiсh work!
    BEFORE UPDATE ON t
    REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    DECLARE
    past_due EXCEPTION;
    begin
    if 1 = 1 then
    raise_application_error(-20001, 'First trigger!' , TRUE);
    end if;
    end t1;
    +/+
    create or replace
    -- Coment with error
    TRIGGER t2
    BEFORE UPDATE ON t
    REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    DECLARE
    past_due EXCEPTION;
    begin
    if 1 <> 1 then
    raise_application_error(-20001, 'Second trigger!' , TRUE);
    end if;
    end;
    +/+
    Result:
    +SQL Command: create or replace --+
    Failed: ORA-24344: success with compilation error
    +24344. 00000 - "success with compilation error"+
    *Cause:    A sql/plsql compilation error occurred.+
    *Action:   Return OCI_SUCCESS_WITH_INFO along with the error code+
    anonymous block completed
    trigger text in SLD Developer:
    create or replace TRIGGER t2
    BEFORE UPDATE ON t
    REFERENCING OLD AS OLD NEW AS NEW FOR EACH ROW
    DECLARE
    past_due EXCEPTION

    It looks to me like there is a bug in the logic that determines if the current statement is SQL (terminated by ";") or PL/SQL (terminated by "/") - putting the comment before the object type you are creating is causing SQL Developer to assume it is SQL and it stops the statement at the first ";".
    The same thing happens if you try to create a package with a comment between the "create or replace" and the "package", for example:
    create or replace
    -- comment
    package xxx_pkg
    i number;
    j number;
    end;
    /creates a package with the following source, executing as a statement (so long as the cursor is between the create and the first ";"):
    package xxx_pkg
    i numbertheFurryOne

  • Request to check this error, success with compilation

    Iam tried to modified the code such that the second set of procedure call the first set but it is again giving this vague error again . Can any one resolve this issue.THANKS
    declare
    X varchar2(8000);
    begin
    for i in 1..5 loop
    execute immediate
    'create or replace procedure prc_'||to_char(i,'fm0000')
    || ' is begin null; end;' ;
    X:='prc_'||to_char(i,'fm0000')||';';
    end loop;
    for i in 5..10 loop
    execute immediate
    'create or replace procedure prc_'||to_char(i,'fm0000')
    || ' is begin'||X|| 'end;' ;
    end loop;
    end;
    ORA-24344: success with compilation error
    ORA-06512: at line 11

    This is what you are trying to do:
    test@ORA10G>
    test@ORA10G> --
    test@ORA10G> declare
      2    X varchar2(8000);
      3  begin
      4    for i in 1..5 loop
      5      dbms_output.put_line('create or replace procedure prc_'||to_char(i,'fm0000')|| ' is begin null; end;') ;
      6  --    execute immediate 'create or replace procedure prc_'||to_char(i,'fm0000')|| ' is begin null; end;' ;
      7      X:='prc_'||to_char(i,'fm0000')||';';
      8    end loop;
      9    for i in 5..10 loop
    10      dbms_output.put_line('create or replace procedure prc_'||to_char(i,'fm0000')|| ' is begin'||X|| 'end;') ;
    11  --    execute immediate 'create or replace procedure prc_'||to_char(i,'fm0000')|| ' is begin'||X|| 'end;' ;
    12    end loop;
    13  end;
    14  /
    create or replace procedure prc_0001 is begin null; end;
    create or replace procedure prc_0002 is begin null; end;
    create or replace procedure prc_0003 is begin null; end;
    create or replace procedure prc_0004 is begin null; end;
    create or replace procedure prc_0005 is begin null; end;
    create or replace procedure prc_0005 is beginprc_0005;end;
    create or replace procedure prc_0006 is beginprc_0005;end;
    create or replace procedure prc_0007 is beginprc_0005;end;
    create or replace procedure prc_0008 is beginprc_0005;end;
    create or replace procedure prc_0009 is beginprc_0005;end;
    create or replace procedure prc_0010 is beginprc_0005;end;
    PL/SQL procedure successfully completed.
    test@ORA10G>
    test@ORA10G>Put a space after BEGIN and before END.
    pratz

  • Warning: Function created with compilation errors. ???

    I created a function with a warning:
    Warning: Function created with compilation errors.
    I'd like to know more detailed information about this warning, how to find them?
    If only with this warning, I don't know how to correct the definition of the function.
    BTW, because it is a warning, I just try to run the sql stmt which will call this function:
    SQL> select strdiff(ename, 'FOR') from emp;
    select strdiff(ename, 'FOR') from emp
    ERROR at line 1:
    ORA-06575: Package or function STRDIFF is in an invalid state.
    /* strdiff is the name of function */
    Thanks in advance!

    Hi,
    I think that your posting may be more suited to the PL/SQL forum.
    after the function is created with errors you should try the command:
    show err
    or
    show errors
    this should at least give you some idea of what is wrong.
    regards Michael

  • Procedure created with compilation errors

    I created a procedure and that when I run it in SQLPlus I get this message:
    Warning: Procedure created with compilation errors.
    Where can I go to see what the errors are?

    I tried adding 'show errors' to the end of the procedure but it didn't display any errors. I'm using this script that is for MS SQL and I wanted to see what I would need to change in order for it to work in Oracle:
    Can you tell me where I should put the 'show errors' statmement?
    DROP PROCEDURE      scp_mig_jobs_copy;
    CREATE PROCEDURE scp_mig_jobs_copy
    AS
    ** File Name:
    ** scp_mig_jobs_copy.sql
    ** Procedure Name:
    ** scp_mig_jobs_copy
    ** Description:
    ** This procedure is used to move data from the limited staging table,
    **          scp_mig_jobs, to the full migration table scp_mig_jobs2
    **          It first trunacates the migration table, then copies the data
    ** Saba Version:
    ** SE2005 May release + August patch.
    ** Input Parameter(s):
    **          None
    ** Output Parameter(s):
    ** None
    ** Return Codes:
    **          None.
    ** Error Codes:
    ** None.
    ** Calling Procedure(s):
    ** Procedures Called:
    **          None.
    ** Database Table(s) Accessed:
    **          sct_mig_jobs
    **          sct_mig_jobs2
    ** Database View(s) Accessed:
    **          None.
    ** Cursor(s):
    **          None.
    ** Misc:
    BEGIN
    DECLARE @xerror     NUMBER;
    PRINT '**************************************************';
    PRINT 'Begin Copying data from the staging table, sct_mig_jobs, to the migration table, sct_mig_jobs2';
    PRINT getDate();
    PRINT ' '
    BEGIN TRAN
    TRUNCATE TABLE sct_mig_jobs2
    INSERT INTO sct_mig_jobs2 (
    name, description, custom0, custom1, --These are the only fields that the staging table has
    id, CI_Name
    created_by, created_on,
    updated_by, updated_on,
    split,
    custom2, custom3, custom4, custom5, custom6, custom7, custom8, custom9,
    process_ind, process_date, valid_rec_ind, rec_status, err_num, err_msg
    SELECT name, description, custom0, custom1, --These are the only fields that the staging table has
    NULL id,
         NULL CI_Name,
    NULL created_by, NULL created_on,
    NULL updated_by, NULL updated_on,
    NULL split,
    NULL custom2, NULL custom3, NULL custom4, NULL custom5, NULL custom6, NULL custom7, NULL custom8, NULL custom9,
    NULL process_ind, NULL process_date, NULL valid_rec_ind, NULL rec_status, NULL err_num, NULL err_msg
    FROM sct_mig_jobs
    SET @xerror = @@error;
    IF(@xerror<>0)
    BEGIN
    ROLLBACK TRAN;
    PRINT 'Error:: ' + STR(@xerror);
    PRINT '--Unable to copy data from the staging table to the migration table';
    END
    ELSE
    BEGIN
    COMMIT TRAN;
    PRINT 'Data successfully copied from the staging table to the migration table';
    END
    PRINT ' ';
    PRINT ' ';
    END
    /

  • Warning: View altered with compilation errors. : Please help.

    Hi All,
    Found few views invalid, tried to compile them, but got the following error. It looks like synonyms are calling each other.
    Please help to compile the view.
    =======================
    SQL> alter view APPS.PER_ADDRESSES_AV12 compile;
    Warning: View altered with compilation errors.
    Checked error:
    SQL> SHOW errors VIEW APPS.PER_ADDRESSES_AV12;
    Errors for VIEW APPS.PER_ADDRESSES_AV12:
    LINE/COL ERROR
    0/0 ORA-01775: looping chain of synonyms
    Extracted DDL:
    ==========
    CREATE OR REPLACE FORCE VIEW "APPS"."PER_ADDRESSES_AV12" ("ROW_KEY", "ADDRESS_
    ID", "TOWN_OR_CITY") AS
    SELECT ROW_KEY, ADDRESS_ID, TOWN_OR_CITY FROM PER_ADDRESSES_A WHERE TOWN_OR_CI
    TY IS NOT NULL OR SUBSTR(AUDIT_TRUE_NULLS,12,1)='Y' UNION ALL SELECT 99991231235
    9591111122222 ROW_KEY, ADDRESS_ID, TOWN_OR_CITY FROM PER_ADDRESSES
    Checked synonyms for the base table:
    =======================
    OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME
    PUBLIC PER_ADDRESSES HR PER_ADDRESSES
    APPS PER_ADDRESSES HR PER_ADDRESSES
    XXHRC PER_ADDRESSES APPS PER_ADDRESSES
    Edited by: 784786 on Dec 22, 2011 7:27 AM

    784786 wrote:
    Found few views invalid, tried to compile them, but got the following error. It looks like synonyms are calling each other.
    Please help to compile the view.
    SQL> alter view APPS.PER_ADDRESSES_AV12 compile;
    Warning: View altered with compilation errors.
    SQL> SHOW errors VIEW APPS.PER_ADDRESSES_AV12;
    Errors for VIEW APPS.PER_ADDRESSES_AV12:
    LINE/COL ERROR
    0/0 ORA-01775: looping chain of synonyms
    CREATE OR REPLACE FORCE VIEW "APPS"."PER_ADDRESSES_AV12" ("ROW_KEY", "ADDRESS_
    ID", "TOWN_OR_CITY") AS
    SELECT ROW_KEY, ADDRESS_ID, TOWN_OR_CITY FROM PER_ADDRESSES_A WHERE TOWN_OR_CI
    TY IS NOT NULL OR SUBSTR(AUDIT_TRUE_NULLS,12,1)='Y' UNION ALL SELECT 99991231235
    9591111122222 ROW_KEY, ADDRESS_ID, TOWN_OR_CITY FROM PER_ADDRESSES
    OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME
    PUBLIC PER_ADDRESSES HR PER_ADDRESSES
    APPS PER_ADDRESSES HR PER_ADDRESSES
    XXHRC PER_ADDRESSES APPS PER_ADDRESSESso break the chain by dropping one or of them

  • Warning: Library created with compilation errors.

    I am trying to run the following in SQLPlus logged in as
    Portal30_SSO on the portal database server:
    create or replace library auth_ext as 'C:\oracle\ora81
    \bin\ssoxldap.dll';
    commit;
    When I run this it gives me the error:
    Warning: Library created with compilation errors.
    I am following the instructions from "Configuring Oracle9iAS
    Portal for LDAP Authentication". I am running Oracle 8.1.7 and
    OID on one W2K server and 9iAS on another W2K server. Any
    suggestions on how to resolve this problem?

    Is there any solution about how to compile XDB.DBMS_XDBUTIL_INT package?
    My XDB.DBMS_XDBUTIL_INT package gives the following error when compiled:
    How can I recreate "XDB.DBMS_XDBUTIL_INT". Currently it does not compile, giving error :
    LINE/COL ERROR
    33/7 PL/SQL: SQL Statement ignored
    34/14 PL/SQL: ORA-00942: table or view does not exist

  • I have a MAC Pro from 2011 currently running MAC OS 10.9.5.  This weekend I cloned the MAC HD drive to a new SSD drive for improved performance.  The clone was completed successfully with no errors.  After the clone completed I successfull restarted my sy

    I have a MAC Pro from 2011 currently running MAC OS 10.9.5.  This weekend I cloned the MAC HD drive to a new SSD drive for improved performance.  The clone was completed successfully with no errors.  After the clone completed I successfully restarted my system using the SSD as the boot device.  I then successfully tested all of my products, including Photoshop CS6 and all of its plug-ins.  I successfully tested the key features that I frequently use.  Today while attempting to launch Photoshop CS6 a message is being displayed indicating that a scratch disk cannot be found.  All drives are available on the system via the Finder and Disk Utility.  I can access all drives including the old MAC HD which is no longer the boot device.  I've even attempted to launch Photoshop from the old device yet the same error persist.  Is there a way to review/edit/change Photoshop preferences if Photoshop doesn't launch?  I've even restarted my system several times to see if that would resolve the issues.  Does anyone have any recommendations for this issue?  Have you previously address this issue? 
    Thank you Gregg Williams

    Boilerplate text:
    Reset Preferences
    http://forums.adobe.com/thread/375776
    1) Close the program and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (not reversible)
    or
    2) Move the Folder. See:
    http://www.bugge.com/Family-and-friends/Illy/illy.html
    --OB

  • Warning: Procedure created with compilation errors.

    I am trying to upload a pdf file into a blob column of a table. I get this error with these three ways of doing that:Warning: Procedure created with compilation errors.
    Any ideas why?
    -- THE STORAGE TABLE FOR THE IMAGE FILE
    ALTER TABLE PDM
    DROP PRIMARY KEY CASCADE;
    DROP TABLE PDM CASCADE CONSTRAINTS;
    CREATE TABLE PDM (
    DNAME VARCHAR2(30), -- DIRECTORY NAME
    SNAME VARCHAR2(30), -- SUBDIRECTORY NAME
    FNAME VARCHAR2(30), -- FILE NAME
    IBLOB BLOB); -- IMAGE FILE
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE (
    PDNAME VARCHAR2,
    PSNAME VARCHAR2,
    PFNAME VARCHAR2) IS
    SRC_FILE BFILE;
    DST_FILE BLOB;
    LGH_FILE BINARY_INTEGER;
    BEGIN
    SRC_FILE := BFILENAME('PDF_DIR', '266-5210.pdf');
    -- INSERT A NULL RECORD TO LOCK
    INSERT INTO PDM
    (DNAME, SNAME, FNAME, IBLOB)
    VALUES
    (PDNAME, PSNAME, PFNAME, EMPTY_BLOB())
    RETURNING IBLOB INTO DST_FILE;
    -- LOCK RECORD
    SELECT IBLOB
    INTO DST_FILE
    FROM PDM
    WHERE DNAME = PDNAME
    AND SNAME = PSNAME
    AND FNAME = PFNAME
    FOR UPDATE;
    -- OPEN THE FILE
    DBMS_LOB.FILEOPEN(SRC_FILE, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.OPEN(DST_FILE, DBMS_LOB.LOB_READWRITE);
    -- DETERMINE LENGTH
    LGH_FILE := DBMS_LOB.GETLENGTH(SRC_FILE);
    -- READ THE FILE
    DBMS_LOB.LOADFROMFILE(DST_FILE, SRC_FILE, LGH_FILE);
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET IBLOB = DST_FILE
    WHERE DNAME = PDNAME
    AND SNAME = PSNAME
    AND FNAME = PFNAME;
    -- CLOSE FILE
    DBMS_LOB.FILECLOSE(SRC_FILE);
    END LOAD_FILE;
    -- THE STORAGE TABLE FOR THE IMAGE FILE
    ALTER TABLE PDM
    DROP PRIMARY KEY CASCADE;
    DROP TABLE PDM CASCADE CONSTRAINTS;
    CREATE TABLE PDM
    FNAME VARCHAR2(1000)
    ,IBLOB BLOB
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE AS (
    SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
    DST_FILE BLOB;
    BEGIN
    -- INSERT A NULL RECORD TO LOCK
    INSERT INTO PDM
    (FNAME, IBLOB)
    VALUES
    ('262-2827.pdf', EMPTY_BLOB())
    RETURNING IBLOB INTO DST_FILE;
    -- OPEN THE FILE
    DBMS_LOB.FILEOPEN(SRC_FILE, DBMS_LOB.FILE_READONLY);
    DBMS_LOB.OPEN(DST_FILE, DBMS_LOB.LOB_READWRITE);
    -- READ THE FILE
    DBMS_LOB.LOADFROMFILE( SRC_FILE, DST_FILE);
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET FNAME = SRC_FILE,
    IBLOB = DST_FILE;
    -- CLOSE FILE
    DBMS_LOB.CLOSE(DST_FILE);
    DBMS_LOB.FILECLOSE(SRC_FILE);
    COMMIT;
    END LOAD_FILE;
    ALTER TABLE IMAGE_TABLE
    DROP PRIMARY KEY CASCADE;
    DROP TABLE IMAGE_TABLE CASCADE CONSTRAINTS;
    CREATE TABLE IMAGE_TABLE (
    ID NUMBER PRIMARY KEY,
    IMAGE ORDSYS.ORDIMAGE);
    CREATE OR REPLACE DIRECTORY IMAGEDIR AS 'C:\cards\';
    GRANT READ ON DIRECTORY IMAGEDIR TO PUBLIC;
    GRANT READ ON DIRECTORY MY_FILES TO twilliam;
    GRANT READ ON DIRECTORY MY_FILES TO tmwillia;
    CREATE OR REPLACE PROCEDURE IMAGE_IMPORT(DEST_ID NUMBER,
    FILENAME VARCHAR2)
    IS
    IMG ORDSYS.ORDIMAGE;
    CTX RAW(64) := NULL;
    BEGIN
    DELETE FROM IMAGE_TABLE
    WHERE ID = DEST_ID;
    INSERT INTO IMAGE_TABLE (ID, IMAGE)
    VALUES (DEST_ID, ORDSYS.ORDIMAGE.INIT())
    RETURNING IMAGE INTO IMG;
    IMG.IMPORTFROM(CTX, 'FILE', 'IMAGEDIR', FILENAME);
    UPDATE IMAGE_TABLE SET IMAGE=IMG WHERE ID=DEST_ID;
    END
    CALL IMAGE_IMPORT(7142,'125-0502.pdf');
    CALL IMAGE_IMPORT(7143,'125-0503.pdf');
    SELECT ID,
    T.IMAGE.GETHEIGHT(),
    T.IMAGE.GETWIDTH()
    FROM IMAGE_TABLE T;
    SELECT ID,
    T.IMAGE.GETFILEFORMAT(),
    T.IMAGE.GETCOMPRESSIONFORMAT()
    FROM IMAGE_TABLE T;
    SELECT ID,
    T.IMAGE.GETCONTENTFORMAT(),
    T.IMAGE.GETCONTENTLENGTH()
    FROM IMAGE_TABLE T;

    In the second load_file procedure you should probably change the update command
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET FNAME = SRC_FILE,
    IBLOB = DST_FILE;into this
    -- UPDATE THE BLOB FIELD
    UPDATE PDM
    SET IBLOB = DST_FILE
    WHERE  FNAME = '262-2827.pdf';but I'm not sure how to explain the eof error message. Usually this happens when you forget an "END;" or "END LOOP;" command.
    Ok I rechecked and the declaration of the second procedure seems wrong
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE AS (
    SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
    DST_FILE BLOB;
    BEGINshould be rewritten as
    -- CREATE THE PROCEDURE TO LOAD THE FILE
    CREATE OR REPLACE PROCEDURE LOAD_FILE
      AS
      SRC_FILE BFILE := BFILENAME('PDF_DIR', '262-2827.pdf');
      DST_FILE BLOB;
    BEGIN
    ...I removed one parenthesis which was not closed.
    And for the image_import procedure there is a semikolon missing after the final END.
    END*;*
    Edited by: Sven W. on Nov 24, 2008 5:54 PM.
    Edited by: Sven W. on Nov 24, 2008 5:56 PM
    Edited by: Sven W. on Nov 24, 2008 5:59 PM

  • Warning: Type created with compilation errors. sql : oracle 11gr2

    I'm trying to create a supertype customer service and subtype agent and supervisor, so they can inherent values however when I try to run this in oracle sql: a message comes up
    Warning: Type created with compilation errors.
    What is wrong with the code below?
    Create or replace type customer_s_type as object ( csID number, csName varchar(15), csType number ) NOT FINAL;  Create or replace type supervisor_type UNDER customer_s_type ( title varchar (10) );  Create or replace type agent_type UNDER customer_s_type (title varchar (10));  Create table supervisor of supervisor_type ( CONSTRAINT supervisor_PK PRIMARY KEY (csID));  Create table agent of agent_type (CONSTRAINT agent_PK PRIMARY KEY (csID));  create table customer_service( csID number(10), csType number(10), constraint supervisor_pk primary key(csID) );

    Wile creating TYPE you need to terminate with a back slash (/) semi colon does not work.
    Try like this
    create or replace type customer_s_type as object ( csid number, csname varchar(15), cstype number ) not final
    create or replace type supervisor_type under customer_s_type ( title varchar (10) )
    create or replace type agent_type under customer_s_type (title varchar (10))

  • Procedure created with compilation errors. help?

    SQL> create or replace procedure p_update_audit_log
    2 ( p_audit_id audit_log.audit_id%type
    3 p_grade_update audit_log.grade_update%type
    4 p_grade audit_log.grade%type
    5 sys_date
    6 p_user_id audit_log.user_id%type
    7 is
    8 BEGIN
    9 insert into audit_log (user_id, audit_id, grade, grade_update,
    10 sys_date)
    11 values (p_user_id, p_audit_id, p_grade, p_grade_update, sys_date);
    12 END p_update_audit_log;
    13
    14
    15
    16
    17
    18 /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE P_UPDATE_AUDIT_LOG:
    LINE/COL ERROR
    3/1 PLS-00103: Encountered the symbol "P_GRADE_UPDATE" when expecting
    one of the following:
    := ) , default character
    The symbol "," was substituted for "P_GRADE_UPDATE" to continue.
    4/1 PLS-00103: Encountered the symbol "P_GRADE" when expecting one of
    the following:
    := ) , default character
    The symbol "," was substituted for "P_GRADE" to continue.
    5/1 PLS-00103: Encountered the symbol "SYS_DATE" when expecting one
    LINE/COL ERROR
    of the following:
    := ) , default character
    The symbol ", was inserted before "SYS_DATE" to continue.
    7/1 PLS-00103: Encountered the symbol "IS" when expecting one of the
    following:
    := ) , default character
    The symbol ")" was substituted for "IS" to continue.
    Could anyone help me with this problem?

    These are syntax errors:
    Try this
    create or replace procedure p_update_audit_log
    ( p_audit_id audit_log.audit_id%type,
    p_grade_update audit_log.grade_update%type,
    p_grade audit_log.grade%type,
    sys_date DATE,
    p_user_id audit_log.user_id%type)
    is
    BEGIN
    insert into audit_log (user_id, audit_id, grade, grade_update,
    sys_date)
    values (p_user_id, p_audit_id, p_grade, p_grade_update, sys_date);
    END p_update_audit_log;

  • Why procedure created with compilation errors?

    CREATE or REPLACE PROCEDURE AddStudent(
    p_stuID number,
    p_lname varchar2(30),
    p_fname varchar2(20),
    p_major varchar2(5) check(major IN
    ('ACCT','ECT','EET','BIS','BSIT','CIS','TCOM')),
    P_standing varchar2(10) check(standing IN
    ('FRESHMAN','SOPHOMORE','JUNIOR','SENIOR')),
    P_gpa number(3,2) IS
    BEGIN
    INSERT INTO STUDENT (P_STUID, P_LNAME, P_FNAME, P_MAJOR,
    P_STANDING, P_GPA, P_ADVISOR) VALUES
    (STUDENT_SEQ.NEXTVAL, 'SMITH', 'HEATHER', 'CIS', 'JUNIOR', 3.8,
    2);
    INSERT INTO STUDENT (P_STUID, P_LNAME, P_FNAME, P_MAJOR,
    P_STANDING, P_GPA, P_ADVISOR) VALUES
    (STUDENT_SEQ.NEXTVAL, 'ELLIOTT', 'DAVE', 'CIS', 'JUNIOR', 3.65,
    2);
    COMMIT;
    END;
    SQL> /
    Warning: Procedure created with compilation errors.
    any help would be appreciated

    I would guess it's because you can't use CHECK like that (at
    least not in Oracle 8i). If you want to check the validity of
    procedural parameters you'll have to code this sort of thing:
    BEGIN
    IF major NOT IN ('whatever', 'etc') THEN
    RAISE_APPLICATION_ERROR(-22200, 'Invlaid value for MAJOR');
    ELSIF ....
    For future reference you can use the SQL*Plus command SHOW ERR
    to see what went wrong - it gives you line numbers and error
    messages.
    HTH, APC

Maybe you are looking for

  • Ora-600 publishing translation

    Getting following error when publishing translation: ORA-20001: Sync error: WWV_FLOW_ICON_BAR.ICON_IMAGE_ALT ORA-00600: internal error code, arguments: [kkxlsb csid mismatch], [871], [871], [1], [2], [], [], [] Problem happened in 1.6 and after upgra

  • How do you get your wi-fi sync to work on your iPhone?

    It says "Automatically sync with iTunes on your computer when your iPhone is plugged in to power and conncect to wifi" Which they are but for some reason my computer doesn't register that my iPhone is there? How do I get it to work?

  • My creative mediasource player won't play

    bought creative x-fi card about 2 months ago and with it came creative mediasource player. it played any formats, avi mpeg jsut fine, now about a week ago it stoped playing avi format, the black playback screen won't come on, but mpeg still plays fin

  • Dynamic names for Datagrid column headers?

    How can I put data from my ws into the headerText for a DataGrid? I was hoping to find a defined property something like "HeaderTextFunction" built into the DataGrid but I didn't see anything like that. Do you have to use the Advanced DataGrid for so

  • Background doubt?

    Hi.. If a report is run in background then I need to download a file in the bcgdrnd and pass it to the spool. How can I achieve this functionality? Thank You