ORA-00904 running queries in Plus

Hi,
I'm receiving some intermittent ORA-00904 errors when I run some of my queries. It's generally "dim_item"."rowid" invalid identifier. It can be other tables, but is almost invariably "rowid" as the invalid field. We're running 9.0.2.54.03 Plus version and 9.2.0.4 database.
Oracle can't seem to explain the error so I was wondering if anyone else had received it in some of their Plus adventures.
Thanks for the feedback!
Mark

Found the problem. This is a new db that I moved the users into and it has star_transformation_enabled set to true. Setting star_transformation_enabled to false fixes the queries. Going to shutdown the DB and restart it with that set to false.
Just wanted to share.
Mark

Similar Messages

  • ORA-00904 Error while running CMP EJB

    When I am running my CMP bean, I get following error,
    2006-07-02 09:58:17,171 DEBUG org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountBean#fi ndByAccountNumber] Executing SQL: SELECT t0_a.ACCOUNT.UOID FROM ACCOUNT t0_a WHERE (t0_a.ACCOUNT.ACCOUNT_NUMBER = ?)
    2006-07-02 09:58:17,250 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.AccountBean#fi ndByAccountNumber] Find failed java.sql.SQLException:
    ORA- 00904: "T0_A"."ACCOUNT"."ACCOUNT_NUMBER": invalid identifier.
    Why is it giving invalide identifier? the length of this identifer is also less then 30 and there are no special characters being used in it.

    I think I have read that you cannot use the "." to navigate through the object, you can only use it for accessing a field of an object (i.e. a column of a table in the DB).
    So, never use more than 1 "." in your requests. In your case, I guess that you need to reformulate the request.

  • Same exact update runs fine in one db but causes ORA-00904 in another

    I have an update statement that runs fine in one db but causes "" error in another. The two databases table structures are the same. I checked for synonyms and reserved words on BASE and COMPANY_ID but did not come up with anything. The db where it is working is 10.2. The db where it is not working is 10.1.
    Here is the statement:
    1 UPDATE t_company base
    2 SET (company_name, company_name_sid, company_name_lco, canonical_name,
    3 short_name, short_name2) =
    4 (SELECT company_name, source_id, company_name_lco, canonical_name,
    5 short_name, short_name2
    6 FROM t_auth_company comp
    7 WHERE comp.company_id = base.company_id
    8 AND source_id =
    9 (SELECT source_id
    10 FROM (SELECT auth.source_id, trumping_order
    11 FROM t_auth_company auth,
    12 t_trumping_rule rl
    13 WHERE auth.company_id = base.company_id
    14 AND auth.company_name IS NOT NULL
    15 AND rl.source_id = auth.source_id
    16 AND rl.attribute_id = 'abc'
    17 ORDER BY rl.trumping_order)
    18 WHERE ROWNUM = 1))
    19 WHERE
    20 (-- The company has been updated
    21 company_id IN (
    22 SELECT company_id
    23 FROM t_auth_company auth
    24 WHERE auth.company_name_lco >= sysdate
    25 OR auth.company_id_lco >= sysdate)
    26 OR
    27 ( -- The trumping rule for the attribute has been changed
    28 SELECT MAX(last_changed_on)
    29 FROM t_trumping_rule rl
    30 WHERE rl.attribute_id = 'abc' ) >= sysdate
    31 )
    32 -- The company has been merged
    33 AND 1 < (SELECT COUNT (*)
    34 FROM t_auth_company auth
    35* WHERE auth.company_id = base.company_id)
    SQL> /
    WHERE auth.company_id = base.company_id
    ERROR at line 13:
    ORA-00904: "BASE"."COMPANY_ID": invalid identifier
    Thank You
    Boris

    Thank you for responding. It is syntactically working in the 10.2 database. Please, see this:
    SQL> UPDATE t_company base
    2 SET (company_name, company_name_sid, company_name_lco, canonical_name,
    3 short_name, short_name2) =
    4 (SELECT company_name, source_id, company_name_lco, canonical_name,
    5 short_name, short_name2
    6 FROM t_auth_company comp
    7 WHERE comp.company_id = base.company_id
    8 AND source_id =
    9 (SELECT source_id
    10 FROM (SELECT auth.source_id, trumping_order
    11 FROM t_auth_company auth,
    12 t_trumping_rule rl
    13 WHERE auth.company_id = base.company_id
    14 AND auth.company_name IS NOT NULL
    15 AND rl.source_id = auth.source_id
    16 AND rl.attribute_id = 'abc'
    17 ORDER BY rl.trumping_order)
    18 WHERE ROWNUM = 1))
    19 WHERE
    20 (-- The company has been updated
    21 company_id IN (
    22 SELECT company_id
    23 FROM t_auth_company auth
    24 WHERE auth.company_name_lco >= sysdate
    25 OR auth.company_id_lco >= sysdate)
    26 OR
    27 ( -- The trumping rule for the attribute has been changed
    28 SELECT MAX(last_changed_on)
    29 FROM t_trumping_rule rl
    30 WHERE rl.attribute_id = 'abc' ) >= sysdate
    31 )
    32 -- The company has been merged
    33 AND 1 < (SELECT COUNT (*)
    34 FROM t_auth_company auth
    35 WHERE auth.company_id = base.company_id)
    36 /
    0 rows updated.
    SQL>
    The table structures are as follows:
    CREATE TABLE RTCR_UCDB.T_AUTH_COMPANY
    AUTH_COMPANY_ID NUMBER(22),
    SOURCE_ID NUMBER(3) NOT NULL,
    LD_COMPANY_ID NUMBER(22),
    SOURCE_COMPANY_ID VARCHAR2(150 BYTE),
    MATCH_DECISION NUMBER(1) DEFAULT 0 NOT NULL,
    MATCH_DECISION_LCO DATE DEFAULT sysdate,
    COMPANY_ID NUMBER(22),
    COMPANY_ID_LCO DATE,
    COMPANY_NAME VARCHAR2(150 BYTE),
    COMPANY_NAME_LCO DATE DEFAULT sysdate,
    CANONICAL_NAME VARCHAR2(150 BYTE),
    SHORT_NAME VARCHAR2(150 BYTE),
    SHORT_NAME2 VARCHAR2(150 BYTE),
    URL VARCHAR2(150 BYTE),
    URL_LCO DATE DEFAULT sysdate,
    NURL VARCHAR2(150 BYTE),
    PRIMARY_SIC VARCHAR2(150 BYTE),
    PRIMARY_SIC_LCO DATE DEFAULT sysdate,
    PRIMARY_TICKER VARCHAR2(15 BYTE),
    PRIMARY_TICKER_LCO DATE DEFAULT sysdate,
    EXCHANGE_ID VARCHAR2(60 BYTE),
    EXCHANGE_ID_LCO DATE DEFAULT sysdate,
    NEXCHANGE_ID VARCHAR2(60 BYTE),
    ADDRESS VARCHAR2(150 BYTE),
    ADDRESS_LCO DATE DEFAULT sysdate,
    NADDRESS VARCHAR2(150 BYTE),
    NADDRESS_CONTAINS VARCHAR2(150 BYTE),
    CITY VARCHAR2(150 BYTE),
    CITY_LCO DATE DEFAULT sysdate,
    NCITY VARCHAR2(150 BYTE),
    STATE VARCHAR2(150 BYTE),
    STATE_LCO DATE DEFAULT sysdate,
    NSTATE VARCHAR2(150 BYTE),
    POSTAL_CODE VARCHAR2(15 BYTE),
    POSTAL_CODE_LCO DATE DEFAULT sysdate,
    NPOSTAL_CODE VARCHAR2(15 BYTE),
    COUNTRY_ID VARCHAR2(10 BYTE),
    COUNTRY_ID_LCO DATE DEFAULT sysdate,
    NCOUNTRY_ID VARCHAR2(10 BYTE),
    TELEPHONE VARCHAR2(60 BYTE),
    TELEPHONE_LCO DATE DEFAULT sysdate,
    NPHONE VARCHAR2(60 BYTE),
    PHONE_7D VARCHAR2(60 BYTE),
    PHONE_AREA VARCHAR2(60 BYTE),
    FAX VARCHAR2(60 BYTE),
    FAX_LCO DATE DEFAULT sysdate,
    NFAX VARCHAR2(60 BYTE),
    GW_COMPANY_ID VARCHAR2(150 BYTE),
    GW_COMPANY_ID_LCO DATE DEFAULT sysdate,
    CIK_NUMBER VARCHAR2(150 BYTE),
    CIK_NUMBER_LCO DATE DEFAULT sysdate,
    IRS_EIN VARCHAR2(150 BYTE),
    IRS_EIN_LCO DATE DEFAULT sysdate,
    MIN_DATA_FLAG VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL,
    OBSOLETE_FLAG VARCHAR2(1 BYTE) DEFAULT 'N' NOT NULL,
    OBSOLETE_FLAG_LCO DATE,
    LAST_CHANGED_BY VARCHAR2(50 BYTE) DEFAULT user NOT NULL,
    LAST_CHANGED_ON DATE DEFAULT sysdate NOT NULL,
    CREATED_ON DATE NOT NULL
    CREATE TABLE RTCR_UCDB.T_TRUMPING_RULE
    SOURCE_ID NUMBER(3) NOT NULL,
    ATTRIBUTE_ID NUMBER(5) NOT NULL,
    TRUMPING_ORDER NUMBER(3),
    LAST_CHANGED_BY VARCHAR2(50 BYTE) DEFAULT USER,
    LAST_CHANGED_ON DATE DEFAULT sysdate
    CREATE TABLE RTCR_UCDB.T_COMPANY
    COMPANY_ID NUMBER(22),
    COMPANY_NAME VARCHAR2(150 BYTE),
    COMPANY_NAME_SID NUMBER(3),
    COMPANY_NAME_LCO DATE,
    CANONICAL_NAME VARCHAR2(150 BYTE),
    SHORT_NAME VARCHAR2(150 BYTE),
    SHORT_NAME2 VARCHAR2(150 BYTE),
    URL VARCHAR2(150 BYTE),
    URL_SID NUMBER(3),
    URL_LCO DATE,
    NURL VARCHAR2(150 BYTE),
    PRIMARY_SIC VARCHAR2(150 BYTE),
    PRIMARY_SIC_SID NUMBER(3),
    PRIMARY_SIC_LCO DATE,
    PRIMARY_TICKER VARCHAR2(15 BYTE),
    PRIMARY_TICKER_SID NUMBER(3),
    PRIMARY_TICKER_LCO DATE,
    EXCHANGE_ID VARCHAR2(60 BYTE),
    EXCHANGE_ID_SID NUMBER(3),
    EXCHANGE_ID_LCO DATE,
    NEXCHANGE_ID VARCHAR2(60 BYTE),
    ADDRESS VARCHAR2(150 BYTE),
    ADDRESS_SID NUMBER(3),
    ADDRESS_LCO DATE,
    NADDRESS VARCHAR2(150 BYTE),
    CITY VARCHAR2(150 BYTE),
    CITY_SID NUMBER(3),
    CITY_LCO DATE,
    NCITY VARCHAR2(150 BYTE),
    STATE VARCHAR2(150 BYTE),
    STATE_SID NUMBER(3),
    STATE_LCO DATE,
    NSTATE VARCHAR2(150 BYTE),
    POSTAL_CODE VARCHAR2(15 BYTE),
    POSTAL_CODE_SID NUMBER(3),
    POSTAL_CODE_LCO DATE,
    NPOSTAL_CODE VARCHAR2(15 BYTE),
    COUNTRY_ID VARCHAR2(10 BYTE),
    COUNTRY_ID_SID NUMBER(3),
    COUNTRY_ID_LCO DATE,
    NCOUNTRY_ID VARCHAR2(10 BYTE),
    TELEPHONE VARCHAR2(60 BYTE),
    TELEPHONE_SID NUMBER(3),
    TELEPHONE_LCO DATE,
    NPHONE VARCHAR2(60 BYTE),
    PHONE_7D VARCHAR2(60 BYTE),
    PHONE_AREA VARCHAR2(60 BYTE),
    FAX VARCHAR2(60 BYTE),
    FAX_SID NUMBER(3),
    FAX_LCO DATE,
    NFAX VARCHAR2(60 BYTE),
    GW_COMPANY_ID VARCHAR2(150 BYTE),
    GW_COMPANY_ID_SID NUMBER(3),
    GW_COMPANY_ID_LCO DATE,
    CIK_NUMBER VARCHAR2(150 BYTE),
    CIK_NUMBER_SID NUMBER(3),
    CIK_NUMBER_LCO DATE,
    IRS_EIN VARCHAR2(150 BYTE),
    IRS_EIN_SID NUMBER(3),
    IRS_EIN_LCO DATE,
    LAST_CHANGED_BY VARCHAR2(50 BYTE) DEFAULT user NOT NULL,
    LAST_CHANGED_ON DATE DEFAULT sysdate NOT NULL,
    CREATED_ON DATE NOT NULL
    )

  • Getting ora:00904 invalid indentifier error while running i query

    Hi,
    I have a remote database and local database both are oracle 10gR2.Now i have written the below mentioned query in my local database and is working fine,but in case remote database it is throughing error ora:00904 invalid indentifier.
    I had export the dump from remote db and import it on my local db and i tried the same and it is working fine on local after that also.
    As i believe that this error usually come for column name not exist or column name or it's length or for any special character in column name of the table.But as i said it is working fine on local db but not in remote db though i am using the same dump for local and remote.
    Though when i am querying the table i can able to fetch data for the any record but when i am using the below mentioned query for the same i am getting the error.As i am doing this to fecth the data for child parent related relationship.
    Can any one suggest is there anything related to configaration or something else.
    Please do let me know if you do want some more information on the query what i am doing inside of it.
    Rgds,
    Anit
    Edited by: Anit A. on Sep 1, 2008 2:32 AM
    Edited by: Anit A. on Sep 1, 2008 2:33 AM

    WITH t
    AS
    SELECT decode(t.spnlevel
    ,3,t.u_quotesdtlid
    ,2,decode((select count(*)
    from u_quotesdtl t2
    where t2.u_quotesdtlid = t.u_quotesdtlid
    and t2.parentspn = (t2.jobgroupid||':'||t2.jobtype)
    ),0,(select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '3'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ),t.u_quotesdtlid
    ,1,decode((select count(*)
    from u_quotesdtl t2
    where t2.QUOTEID = t.QUOTEID
    and t2.parentspn = (t2.jobgroupid||':'||t2.jobtype)
    ),0,t.u_quotesdtlid,decode((select count(*)
    from u_quotesdtl t3
    where t3.QUOTEID = t.QUOTEID
    and t3.parentspn = (t3.jobgroupid||':'||t3.jobtype)
    and t3.u_quotesdtlid in (select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ),0,(select t4.u_quotesdtlid
    from u_quotesdtl t4
    ,(select t1.parentspn
    ,t1.jobtype
    ,t1.jobgroupid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ) t5
    where t4.spnitemcode = t5.parentspn
    and t4.spnlevel = '3'
    and t4.jobtype = t5.jobtype
    and t4.jobgroupid = t5.jobgroupid
    and t4.QUOTEID = t.QUOTEID
    (select t1.u_quotesdtlid
    from u_quotesdtl t1
    where t1.spnitemcode = t.parentspn
    and t1.spnlevel = '2'
    and t1.jobtype = t.jobtype
    and t1.jobgroupid = t.jobgroupid
    and t1.QUOTEID = t.QUOTEID
    ,null,t.u_quotesdtlid) as parentquoteid
    ,t.u_quotesdtlid as quotesdtlid
    ,t.spnlevel as spnlevel
    FROM u_quotesdtl t
    WHERE t.QUOTEID ='som key id'
    ORDER BY parentquoteid,t.spnlevel desc
    select * from t;

  • Getting ORA-00904 whle running a procedure!

    hi ,
    the following procedure is meant for getting the details which has name of the user tables alone along with number of columns,but am getting -ERROR IN BLOCK:::ORA-00904: "tablename": invalid identifier.
    DECLARE
    v_cols NUMBER:=0;
    cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
    FOR rec IN c
    LOOP
    v_cols:=0;
    EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in ('||rec.table_name||') group by TABLE_NAME' INTO v_num_rows;
    DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
    END LOOP;
    DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;
    if there anything needs to change in procedure ,let me know.

    DECLARE
           v_cols NUMBER:=0;
           cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
           FOR rec IN c
          LOOP
              v_cols:=0;
          EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in ('''||rec.table_name||''') group by TABLE_NAME' INTO v_num_rows;      ------> Added '' before and After Table Name to allow Oracle to consider as String
              DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
          END LOOP;
          DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;You can use below version using Parameter Binding (Untested!!!)
    DECLARE
           v_cols NUMBER:=0;
           cursor c is SELECT table_name FROM user_tables ORDER BY table_name;
    BEGIN
           FOR rec IN c
          LOOP
              v_cols:=0;
          EXECUTE IMMEDIATE 'select count(COLUMN_NAME) from all_col_comments where TABLE_NAME in (:1) group by TABLE_NAME' INTO v_num_rows using rec.table_name;
              DBMS_OUTPUT.PUT_LINE (RPAD (rec.table_name, 32) || LPAD (v_num_rows, 9));
          END LOOP;
          DBMS_OUTPUT.PUT_LINE ('-------------------End_of_Script-------------------');
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERROR IN BLOCK:::'||SQLERRM);
    END;

  • PL/SQL: ORA-00904: invalid identifier (DG4ODBC 11.2.0.2 & MySQL)

    I have a PL/SQL script processing information between Oracle database and MySQL database. My script ran perfectly with DG4ODBC 11.1.0.7. Then we upgraded Oracle to 10.2.0 and DG4ODBC 11.2.0.2. Now if I run my script from Solaris command line like ./myscript.shl, I get the following errors:
    PL/SQL: ORA-00904: "cmswhit_moodle1"."mdl_grade_grades"."finalgrade": invalid identifier
    PL/SQL: ORA-00904: "cmswhit_moodle1"."mdl_question_states"."attempt": invalid identifier
    The strange thing is if I run the same query by cut and paste into sqlplus from command line, the query works perfectly without any problems.
    What is the cause of this problem?
    Any help would be greatly appreciated.
    Jeffrey

    Hi Klaus,
    The problem was solved after I updated MySQL ODBC to a new version from 5.1.8 to 5.1.13.
    Summary of the problem and its solution:
    The Problem: It appears that dg4odbc 11.2.0.2 requires a newer version of MyODBC. Previously I used MyODBC 5.1.8 which ran into problems with dg4odbc 11.20.0.2.
    The Solution: After I updated MyODBC to 5.1.13, my PL/SQL scripts all work.
    I need to point out that with MyODBC 5.1.8, I can run queries and updates from SQL*Plus console, but now PL/SQL scripts.
    I'll close this thread.
    Once again, thank you and happy holidays.
    Jeffrey

  • RMAN-06004:ORACLE error from recovery catalog ... ORA-00904: : invalid ...

    Good Morning All,
    One of our RMAN backups is failing with the following error message. Any suggestions would be greatly appreciated.
    ==================================================================================================
    Starting backup at 12/30/2008 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 12/30/2008 22:03:47
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
    2>
    3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    4>
    5> # check if database can be restored
    6> # RESTORE DATABASE VALIDATE;
    7>
    8> # check if controlfile can be restored
    9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10>
    11> # check if archivelogs for the past two weeks can be restored
    12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
    13>
    14> # - Verify all backups on backup media are intact
    15> # CROSSCHECK BACKUP OF DATABASE;
    16>
    17> # - Display a list of files that need to be backed up based on the retention
    18> # policy. For this case study, files that don't have at least 1 backups
    19> # will be reported.
    20> REPORT NEED BACKUP;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 12/30/2008 22:03:48
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> # - delete un-necessary backups. This command deletes backups based on the
    2> # retention policy.
    3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
    4> #########DELETE OBSOLETE;
    5>
    6> # - get complete list of existing backups
    7> LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/30/2008 22:03:49
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> #-end of file-
    2> **end-of-file**
    RMAN>
    Edited by: ORA_UMAIR on Dec 31, 2008 7:51 AM

    This Oracle Database is 9.2.0.6.0. Here is the complete log file. The RMAN script that I am using ran successfully many times before.
    ====================================================================================================
    Recovery Manager: Release 9.2.0.6.0 - 64bit Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
    RMAN>
    connected to recovery catalog database
    RMAN>
    connected to target database: CUSTPR (DBID=525071053)
    RMAN>
    RMAN> #########################################################################
    2> # LEVEL 0 BACKUP #
    3> #########################################################################
    4>
    5> # Configure backups to be written to disk.
    6> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    old RMAN configuration parameters:
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    new RMAN configuration parameters:
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Set the retention policy to a recovery window of 7 days. This ensures that
    2> # RMAN retains all backups needed to recover the database to any point in time
    3> # in the last 7 days. You can use the DELETE OBSOLETE command to delete
    4> # backups that are no longer required by the retention policy. To exclude a
    5> # backup from consideration by the policy, you can use KEEP option with the
    6> # BACKUP command.
    7> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to use two disk channels for backup, restore, recovery, and
    2> # maintenance operations.
    3> CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    old RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    new RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to write disk backups to the /backup directory.
    2> # The format specifier %t is replaced with a 4-byte timestamp, %s with the
    3> # backup set number, and %p with the backup piece number.
    4> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    old RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    new RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to back up the control file after each backup.
    2> CONFIGURE CONTROLFILE AUTOBACKUP ON;
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to write controlfile autobackups to the /backup directory.
    2> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Enable the backup optimization feature introduced in 9i to make sure that
    2> # RMAN won't backup an archivelog or datafile if there already exists a backup
    3> # of that file. The FORCE option can be used to override optimization on a
    4> # specific BACKUP command.
    5> CONFIGURE BACKUP OPTIMIZATION ON;
    old RMAN configuration parameters:
    CONFIGURE BACKUP OPTIMIZATION ON;
    new RMAN configuration parameters:
    CONFIGURE BACKUP OPTIMIZATION ON;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Use the SHOW ALL command to see the current configuration settings.
    2> SHOW ALL ;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%d_bkp_cf%F';
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 1;
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%d_bkp_df%t_Set%s_Piece%p';
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orahome2/custprdb/9.2.0/dbs/snapcf_custpr.f'; # default
    RMAN>
    RMAN> # The following commands are run each day to start the backup cycle.
    2> # The steps are:
    3> # - Take an incremental level 0 backup of the database. A level 0 backup is
    4> # a complete backup of the entire file which can be used as the basis
    5> # for a subsequent incremental backup.
    6> # - Backup all archivelogs that have not already been backed up.
    7> # - Delete on-disk archivelogs older than seven days.
    8>
    9> BACKUP INCREMENTAL LEVEL 0 FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p'
    10> DATABASE maxsetsize 33G
    11> PLUS ARCHIVELOG FORMAT '/backups/admin/custpr/%d_bkp_al%t_Set%s_Piece%p'
    12> delete all input;
    Starting backup at 12/30/2008 22:01:40
    current log archived
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=11 devtype=DISK
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=8008 recid=7910 stamp=674638862
    input archive log thread=1 sequence=8009 recid=7911 stamp=674671207
    input archive log thread=1 sequence=8010 recid=7912 stamp=674697380
    input archive log thread=1 sequence=8011 recid=7913 stamp=674780433
    input archive log thread=1 sequence=8012 recid=7914 stamp=674784211
    input archive log thread=1 sequence=8013 recid=7915 stamp=674863288
    input archive log thread=1 sequence=8014 recid=7916 stamp=674863300
    channel ORA_DISK_1: starting piece 1 at 12/30/2008 22:01:41
    channel ORA_DISK_1: finished piece 1 at 12/30/2008 22:03:47
    piece handle=/backups/admin/custpr/CUSTPR_bkp_al674863300_Set3083_Piece1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:02:07
    channel ORA_DISK_1: deleting archive log(s)
    archive log filename=/custpr/arch/arch_custpr_8008.log recid=7910 stamp=674638862
    archive log filename=/custpr/arch/arch_custpr_8009.log recid=7911 stamp=674671207
    archive log filename=/custpr/arch/arch_custpr_8010.log recid=7912 stamp=674697380
    archive log filename=/custpr/arch/arch_custpr_8011.log recid=7913 stamp=674780433
    archive log filename=/custpr/arch/arch_custpr_8012.log recid=7914 stamp=674784211
    archive log filename=/custpr/arch/arch_custpr_8013.log recid=7915 stamp=674863288
    archive log filename=/custpr/arch/arch_custpr_8014.log recid=7916 stamp=674863300
    Finished backup at 12/30/2008 22:03:47
    Starting backup at 12/30/2008 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 12/30/2008 22:03:47
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
    2>
    3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    4>
    5> # check if database can be restored
    6> # RESTORE DATABASE VALIDATE;
    7>
    8> # check if controlfile can be restored
    9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10>
    11> # check if archivelogs for the past two weeks can be restored
    12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
    13>
    14> # - Verify all backups on backup media are intact
    15> # CROSSCHECK BACKUP OF DATABASE;
    16>
    17> # - Display a list of files that need to be backed up based on the retention
    18> # policy. For this case study, files that don't have at least 1 backups
    19> # will be reported.
    20> REPORT NEED BACKUP;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 12/30/2008 22:03:48
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> # - delete un-necessary backups. This command deletes backups based on the
    2> # retention policy.
    3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
    4> #########DELETE OBSOLETE;
    5>
    6> # - get complete list of existing backups
    7> LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/30/2008 22:03:49
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> #-end of file-
    2> **end-of-file**
    RMAN>
    Recovery Manager complete.

  • ORA-00904 and packaged function in report

    Oracle 9.2.0.7
    APEX 2.0
    Is APEX not able to deal with SQL that calls a packaged function?
    I ask because I'm able to execute this query:
    SELECT s.doc_id,
    s.last_name || ', ' || s.first_name full_name,
    s.p_id,
    s.create_date
    , rwa_wfrole.get_role_list(s.proj_id, s.p_id) wfrole_label
    FROM signatures_vw s
    WHERE s.proj_id = 182
    AND s.status = 'APPROVED'
    ORDER BY s.create_date, s.last_name, s.first_name
    in SQL*Plus, but not in the SQL Workshop or in a report region. In the latter case I get "ORA-00904 invalid identifier" for "rwa_wfrole.get_role_list"... which is a packaged function. Actually, to be more precise, it's a package in a remote database. In the APEX instance, I have a synonym pointing to it.
    Thanks for insight.
    -John

    I can't reproduce this in 10g. I did find bug 4177810 (Fixed in 9.2.0.8 Server Patch Set) that looks a bit like this problem.
      Description
        An unexpected ORA-904 can occur for some internally generated SQL
        when the select list contains non-column constants and the select
        appears in the FROM clause. This can occur for SQL produced for
        parallel query or for remote / distributed queries.
        Workaround:
          Rewrite the query to avoid constant expressions in the FROM clause select lists.***************************
    There are also recommendations dating way back that you should include the schema name in the Create Synonym statement.
    Scott

  • ORA-00904 over DBLINK

    Hi,
    I have a cursor which queries some tables over a DBLINK. The remote
    database is Oracle 8.1.7.4 and package is being compiled on 10.2.0.3
    Since this morning I am getting the below error message while trying
    to compile the package:
    112/10 PL/SQL: ORA-00904: "MIL"."ORGANIZATION_ID": invalid
    identifier
    However, when I run the cursor query in a different SQL session, it
    fetches data. The cursor definition is
    CURSOR curLocators(pOrganizationId NUMBER) IS
    SELECT ood.organization_code organization_code
    ,NULL row_organization_id
    ,mil.segment1||'.'||mil.segment2||'.'||mil.segment3||'.'||
    mil.segment4 Concatenated_Segments
    ,NULL row_item_id
    ,mil.description
    ,mil.inventory_location_type --no longer used
    ,mil.picking_order
    ,mil.location_maximum_units
    ,mil.subinventory_code
    FROM mtl_item_locations@convsourcedb mil
    ,mtl_material_statuses_vl@convsourcedb mms
    ,org_organization_definitions@convsourcedb ood
    ,(SELECT sum(total_qoh) total_qoh,
    subinventory_code,
    organization_id,
    locator_id
    FROM mtl_onhand_locator_v@convsourcedb
    GROUP BY locator_id, subinventory_code,
    organization_id
    ) mol
    WHERE 1=1
    AND NVL(mil.status_id,1) = mms.status_id(+)
    AND ood.organization_id = mil.organization_id
    AND mms.status_code = 'Active'
    AND mil.enabled_flag = 'Y'
    AND mol.organization_id = mil.organization_id
    AND mol.locator_id = mil.inventory_location_id
    AND mil.organization_id = pOrganizationId
    The column definetely exists in the base table
    SQL> select organization_id from mtl_item_locations@convsourcedb where
    rownum=1;
    ORGANIZATION_ID
    216
    I tried to comment out the where clause which is throwing the error,
    but the package compilation fails with another Where clause error.
    All this was working absolutely fine till last evening and I have not
    changed the cursor query since then.
    How can I rectify this?
    Any inputs would be greatly appreciated.
    Thanks,
    Ashish

    Hi Ashish,
    Maybe the link user and the owner of the remote table are not the same?
    What do you have here :
    select tab.owner remote_owner, lnk.username link_user
      from all_db_links lnk, all_tables@convsourcedb tab
    where tab.table_name = 'MTL_ITEM_LOCATIONS'
       and lnk.db_link = 'CONVSOURCEDB';Regards
    Peter

  • Heterogeneous Services ODBC to MS SQLSvr - ORA-00904 error

    Hello, I have successfully setup a heterogeneous Services ODBC to MS SQLSvr using the steps outlined at http://www.orafusion.com/art_orahs.htm.
    My problem is, the only queries that run without errors are SELECT * FROM tablename@xxx. When I try SELECT colname FROM tablename@xxx I get an ORA-00904: "colname": invalid identifier. Any thoughts?
    Also, will I be able to update MS SQLSvr tables using this link?
    Thanks.

    Hello, Your suggestion worked. Even though all the column_names are lower case, if I surrounded the column names with double quotes the query would work.
    Another question. I'm wanting to update a SQLServer table with data from a Oracle table using a query like:
    INSERT INTO sql_table@xxx
    SELECT * FROM oracle_table ;
    Is this possible? I'm getting a "ORA-02025: all tables in the SQL statement must be at the remote database" error message which looks like I can't.
    Thanks.

  • ORA-00904 when use column alias in Record Group Query

    Is it possible to use column aliases in Record Group Queries?
    I have a query that runs fine in SQL*Developer, but gives me runtime errors when I use it as a Record Group Query.
    When I use it as a Record Group Query, the Form compiles, but at runtime I receive the following errors:
    FRM-40502: ORACLE error: unable to read list of values
    when I use Help - Display Error, I see:
    ORA-00904:"CHILDNAME":invalid identifier
    The query is something like this
    select decode(complex stuff here) as "childname" ....
    I've tried it with and without the double quotes surrounding the alias name, and have also tried it without using the "as" keyword.
    I would appreciate any suggestions or insights. I'm using Forms 9.0.4.
    Thanks.

    It looks like this is caused by bug 725059:
    "FILTER BEFORE DISPLAY" DOESN'T WORK IF LOV HAS COLUMN ALIASES (TRIAGE1098)
    My LOV does have the Filter Before Display turned on. Here's the text of the bug:
    IF an LOV is created with column aliases in the select statement, (eg: select ename emp_name from emp) and the LOV property "Filter Before Display" is "Yes", THEN when you attempt to filter the LOV at runtime, (eg: type '%' then press the 'Find' button) the internal WHERE clause that forms sends to the database is: WHERE column_alias LIKE '%%' This is incorrect syntax. A client-side sqlnet trace shows this. The correct syntax should be: WHERE column LIKE '%%' . The incorrect syntax results in no rows returned. However no error is displayed by forms to the user.

  • Exp 报EXP-00008: ORACLE error 904 encountered;ORA-00904错误

    环境:RAC11gR2+Redhat6.1
    [oracle@bppfedb1 mouse]$ exp BPPF_EAS/ApNCNOZqGx BUFFER=64000 FILE='/home/oracle/mouse/exp_bppf_tvs20121126.DMP' log='/home/oracle/mouse/exp_bppf_tvs20121126.log' OWNER=BPPF_EAS
    Export: Release 11.2.0.3.0 - Production on Tue Nov 27 00:12:16 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
    OLAP, Data Mining,
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses ZHS16GBK character set (possible charset conversion)
    About to export specified users ...
    . exporting pre-schema procedural objects and actions
    . exporting foreign function library names for user BPPF_EAS
    . exporting PUBLIC type synonyms
    EXP-00008: ORACLE error 904 encountered
    ORA-00904: : invalid identifier
    EXP-00000: Export terminated unsuccessfully
    使用
    expdp BPPF_EAS/ApNCNOZqGx directory=DATA_PUMP_DIR dumpfile=exp_bppf_tvs20121126.dmp schemas=BPPF_EAS logfile=exp_bppf_tvs20121126.log
    换用expdp可以成功
    尝试了几台服务器都遇到这个问题,暂时没有找到问题的原因

    问题已解决:
    ORACLE error 904 问题是因为回收了public 的dbms_java执行权限,重新授予解决。
    trace=y需要的权限问题: 应该需要grant dba to xxx; 单exp_full_database好像不行,下面是测试的情况
    when the Data Pump TRACE parameter is used in Oracle10g Release 2 or higher, then the user who connects to the database and runs the export DataPump job needs to have the DBA role or the EXP_FULL_DATABASE role (the same applies to Import DataPump with TRACE parameter: DBA or IMP_FULL_DATABASE role required), e.g.:
    GRANT exp_full_database TO scott;
    -- or:
    GRANT dba TO expdp_role;
    测试:
    oracle@linux:~/mouse> sqlplus /nolog
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Dec 5 07:23:00 2012
    Copyright (c) 1982, 2009, Oracle. All rights reserved.
    SQL> conn /as sysdba
    Connected.
    SQL> drop user mouse cascade;
    User dropped.
    SQL> create user mouse identified by mouse_2012
    2 default tablespace users
    3 temporary tablespace temp
    4 quota unlimited on users ;
    grant connect to mouse;
    grant resource to mouse;
    grant select any table to mouse;
    grant select any dictionary to mouse;
    grant exp_full_database to mouse;
    User created.
    SQL>
    Grant succeeded.
    SQL>
    Grant succeeded.
    SQL>
    Grant succeeded.
    SQL>
    Grant succeeded.
    SQL>
    Grant succeeded.
    SQL>
    SQL>
    SQL> conn mouse/mouse_2012
    create table test as select * from dba_users;Connected.
    SQL>
    Table created.
    SQL> !
    oracle@linux:~/mouse> exp mouse/mouse_2012 tables=test file=test.dmp feedback=100000 buffer=10000000 indexes=y triggers=y trace=y;
    Export: Release 11.2.0.1.0 - Production on Wed Dec 5 07:24:35 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    EXP-00056: ORACLE error 1031 encountered
    ORA-01031: insufficient privileges
    EXP-00000: Export terminated unsuccessfully
    oracle@linux:~/mouse> exit
    exit
    SQL> conn /as sysdba
    Connected.
    SQL> grant dba to mouse;
    Grant succeeded.
    SQL> !
    oracle@linux:~/mouse> exp mouse/mouse_2012 tables=test file=test.dmp feedback=100000 buffer=10000000 indexes=y triggers=y trace=y;
    Export: Release 11.2.0.1.0 - Production on Wed Dec 5 07:24:50 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Export done in US7ASCII character set and AL16UTF16 NCHAR character set
    server uses ZHS16GBK character set (possible charset conversion)
    About to export specified tables via Conventional Path ...
    . . exporting table TEST
    33 rows exported
    Export terminated successfully without warnings
    继续跟踪

  • Advanced Conditions causing ORA-00904 invalid identifier

    I have another weird thing going on...
    It may be the complexity of the data I'm pulling, but I'm going to simplify the problem first...
    I have several conditions in my workbook that I need to be true regardless then I need the following (this is a payroll thing):
    ((Total Regular Hours > 40 AND Total Overtime = 0) OR (Total Overtime > 0 AND (Total Regular Hours - Total Overtime Hours) <> 40))
    So, I'm using Discoverer Plus 10g and if I create separate conditions for Total Overtime > 0 and (Total Regular Hours - Total Overtime Hours) <> 40) it will work, but if I try to combine them into one condition (so I can then add my OR and the other 2 conditions) it gives me the "ORA-00904 invalid identifier" error and will not run.
    The only way I've been able to do it is to create 3 conditions and 2 worksheets. That way, I can add (Total Regular Hours > 40 AND Total Overtime = 0) in one condition and apply it to one sheet; then I the other 2 separate conditions can be applied to the other worksheet.
    I hate having to have 2 worksheets when I should be able to create an advanced condition... anyone have any ideas?
    Regards,
    Emily

    It is actually a typo in the message because I have a calculated column that calculates the difference... sorry.
    I did try the idea of running the SQL that was generated in SQL Developer and it doesn't look right.
    It did all my other conditions under the where, but then where I would have thought it should do another and it did a WHERE.... see below. (I only pasted from the from statement on to save room)
    FROM HRBG_PEOPLE_ASSIGNMENT o393615, APPS.PTEN_PAY_BEE_V o393616
    WHERE ( (o393616.ASSIGNMENT_ID = o393615.ASSIGNMENT_ID))
    AND (o393615.BG_SECURITY_FLAG_CODE = 'Y')
    AND (o393616.DATE_EARNED BETWEEN o393615.ASSIGNMENT_START_DATE AND o393615.ASSIGNMENT_END_DATE AND o393616.DATE_EARNED BETWEEN o393615.RECORD_START_DATE AND o393615.RECORD_END_DATE)
    AND (o393616.DATE_EARNED IN (:"Date Earned Dates"))
    AND (o393616.EFFECTIVE_DATE = :"Period End Date")))))
    WHERE ( ( NP100 ) > 40 AND ( NP101 ) = 0)
    AND ( ( NP104 ) <> 40 AND ( NP105 ) > 0)
    ORDER BY E393849 ASC ;
    Do you see the WHERE that I marked in BOLD? That should be an AND...
    I even tried creating one crazy long condition to include everything in one and still got the same error and it produced the same SQL. I am thinking it has to do with the fact that I'm actually showing group totals for Regular Hours and Overtime and then subtracting them to get the difference. It all breaks when I add that difference in with the others. If I keep it separate, it does fine.
    By the way, the error I get when running just the SQL is "not all variables bound"
    Thanks,
    Emily

  • Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier

    Hi everyone,
    we are facing the below issue when trying to schedule a BI report.
    Error Details:
    +oracle.apps.xdo.servlet.scheduler.ProcessingException: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080319)): oracle.toplink.exceptions.DatabaseException+
    Internal Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    Error Code: 904
    Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT 50 WHERE SEQ_NAME = 'JOB_ID_SEQ'+
    Query: DataModifyQuery()
    +     at oracle.apps.xdo.servlet.scheduler.toplink.ToplinkDataHandler.insertJob(ToplinkDataHandler.java:830)+
    +     at oracle.apps.xdo.servlet.ui.scheduler.SchedulerServlet.scheduleJob(SchedulerServlet.java:1896)+
    +     at oracle.apps.xdo.servlet.ui.scheduler.SchedulerServlet.doPost(SchedulerServlet.java:293)+
    +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)+
    +     at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)+
    +     at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64)+
    +     at oracle.apps.xdo.servlet.security.SecurityFilter.doFilter(SecurityFilter.java:94)+
    +     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:621)+
    +     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)+
    +     at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)+
    +     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)+
    +     at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)+
    +     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)+
    +     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)+
    +     at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)+
    +     at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)+
    +     at java.lang.Thread.run(Thread.java:595)+
    +Caused by: Exception [TOPLINK-4002] (Oracle TopLink - 11g Release 1 (11.1.1.0.0) (Build 080319)): oracle.toplink.exceptions.DatabaseException+
    Internal Exception: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    Error Code: 904
    Call: UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT 50 WHERE SEQ_NAME = 'JOB_ID_SEQ'+
    Query: DataModifyQuery()
    +     at oracle.toplink.exceptions.DatabaseException.sqlException(DatabaseException.java:296)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:724)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:790)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:524)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:467)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeCall(AbstractSession.java:795)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:193)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:179)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:222)+
    +     at oracle.toplink.internal.queryframework.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:202)+
    +     at oracle.toplink.queryframework.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:55)+
    +     at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:671)+
    +     at oracle.toplink.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2260)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1074)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1058)+
    +     at oracle.toplink.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1032)+
    +     at oracle.toplink.sequencing.QuerySequence.update(QuerySequence.java:319)+
    +     at oracle.toplink.sequencing.QuerySequence.updateAndSelectSequence(QuerySequence.java:258)+
    +     at oracle.toplink.sequencing.StandardSequence.getGeneratedVector(StandardSequence.java:62)+
    +     at oracle.toplink.sequencing.DefaultSequence.getGeneratedVector(DefaultSequence.java:144)+
    +     at oracle.toplink.sequencing.Sequence.getGeneratedVector(Sequence.java:256)+
    +     at oracle.toplink.internal.sequencing.SequencingManager$Preallocation_Transaction_NoAccessor_State.getNextValue(SequencingManager.java:444)+
    +     at oracle.toplink.internal.sequencing.SequencingManager.getNextValue(SequencingManager.java:873)+
    +     at oracle.toplink.internal.sequencing.ClientSessionSequencing.getNextValue(ClientSessionSequencing.java:75)+
    +     at oracle.toplink.internal.descriptors.ObjectBuilder.assignSequenceNumber(ObjectBuilder.java:234)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.assignSequenceNumbers(UnitOfWorkImpl.java:419)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.calculateChanges(UnitOfWorkImpl.java:497)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1407)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commitRootUnitOfWork(UnitOfWorkImpl.java:1167)+
    +     at oracle.toplink.internal.sessions.UnitOfWorkImpl.commit(UnitOfWorkImpl.java:939)+
    +     at oracle.apps.xdo.servlet.scheduler.toplink.ToplinkDataHandler.insertJob(ToplinkDataHandler.java:815)+
    +     ... 16 more+
    Caused by: java.sql.SQLException: ORA-00904: "SEQ_NAME": invalid identifier
    +     at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)+
    +     at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)+
    +     at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)+
    +     at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:113)+
    +     at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:561)+
    +     at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1161)+
    +     at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1585)+
    +     at oracle.toplink.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:713)+
    +     ... 45 more+
    Found a thread related to this but there it was explained that the error was occuring when trying to notify regarding output through email. In our case, issue is occuring just during scheduling itslef.
    Also I haved checked the following schedular tables in my database.
    SQL> select table_name from all_tables where table_name like 'S_NQ%'
    +2 /+
    TABLE_NAME
    S_NQ_ERR_MSG
    S_NQ_INSTANCE
    S_NQ_JOB_PARAM
    S_NQ_JOB
    SQL> select SEQ_NAME.CURRVAL FROM DUAL;
    select SEQ_NAME.CURRVAL FROM DUAL
    *+
    ERROR at line 1:
    ORA-02289: sequence does not exist
    Please help me out in solving this as I have tried almost all possible solutions.
    Thanks,
    Sri Harsha.
    Edited by: user10545574 on Dec 20, 2009 10:24 PM

    Hello,
    In the delivery email configuration server page (under BI Publisher Admin Tab), the username / password to enter is the one defined on the email server itself. It is the user that will be user to send the emails when scedhuling a report.
    It may not be Administrator/ Administrator (not a user defined with OBI admin tool) but the username/password defined on the email server itself.
    Moreover, to properly configure the BI Publisher Scheduler, it is a prerequistes to create bipsched user on Oracle DB and install the schema tables in Oracle DB (by clicking on Install Schema button after defining database connection under Admin / Scheduler Configuration tab)
    From the error your are getting 'SEQ_NAME unknown..., it appears that the tables are not created'.
    Hope this helps and good luck
    Matthieu

  • Multi-row sub query returns  ORA-00904 :invalid identifier error

    I am creating a report from two tables that I am not joining. I want a single line for every row in table1 that meets a date range. Table2 can contain none or many rows for each recored in table1. I want to get up to two fields from table2.
    I was using a case statement to check if there was data and then an in-line query or subquery. Once again, the idea is to have a single line on the report for each table1 record.
    I get this error with the code below. It seems the nested multi-row subquery can not see the a.cr_mas_cr_no identifier.
    ORA-00904: "a"."cr_mas_cr_no": invalid identifier
    Any help is greatly appreciated,
    Sam
    select
    a.cr_mas_cr_no "CRNO", a.cr_mas_type "TYPE", a.cr_mas_status "CR Status",
    a.cr_mas_date_logged "Logged date", a.CR_REL_REQ_APP_DATE "RTP approved",a.CR_REL_REQ_RTP_DATE "RTP Date",
    a.cr_accepted_date "Complete", a.cr_mas_submitted_by "Requester",
    select doc_user FROM crrm_cr_documents WHERE doc_cr_number =a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'BD' ) "Bus Design",
    (select doc_user FROM crrm_cr_documents WHERE doc_cr_number = a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'TD' ) "Tech Design",
    (select doc_user FROM crrm_cr_documents WHERE doc_cr_number = a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'TE' ) "User acceptance test",
    case
    when (select count(appr_user) from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') > 0
    then (select appr_user from (select * from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    end
    "RTP #1",
    case
    when (select count(appr_user) from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') > 1
    then (select appr_user from (select * from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 2)
    end
    "RTP #2",
    a.CR_REL_REQ_RTP_BY "Released by",
    a.CR_ACCEPTED_BY "Post RTP User Acceptance",
    a.cr_mas_title "Title", a.cr_mas_id "ID"
    from
    crrm_crmaster a
    where
    (a.CR_REL_REQ_RTP_DATE >= :P1109_BEGDATE and (a.CR_REL_REQ_RTP_DATE <= :P1109_ENDDATE) and
    (a.cr_mas_status = 'Complete' or (a.cr_mas_status = 'Release Approved'and a.CR_REL_REQ_APP_DATE < :P1109_ENDDATE))
    Message was edited by:
    slavanaway

    Iceman,
    Thanks for the reply I will try your suggestion.
    I will try and explain why I think two subqueries (an in-line query with a subquery?) are required. I will use the creation of the column RTP #1 as the example as the RTP #2 column is only different in the rownum selected.
    Looking only at the lines that fail, here is my analysis. (If I rem out the two case lines the query runs, I just don't get two columns of data I need.) I will only examine the first case as the second is changed to extract the second approval via the rownum = 2 criteria. The first statement checks there is at least one RTP approval stored for the request and then gets the user who approved the request if the test is true.
    case when
    (select count(appr_user) from crrm_cr_approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP') > 0
    then
    The above part works fine and the correct count of approvals is returned.
    (select appr_user from (select * from crrm_cr_approvals where appr_cr_no=a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    end
    "RTP #1",
    I moved the parenthesis to the correct location. There can be multiple approvals for a given parent record. Some parent records need one, some need two approvals. If I replace
    (select appr_user from (select * from crrm_cr_approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
    with
    (select appr_user from approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP' and rownum = 1)
    The correct result is returned because it returns exactly one row as rownum=1 limits the query. When rownum = 2 then the query returns null as the rownum never gets to two as the rownum column is built via the set created by the second subquery.
    The subquery builds a set of approvals for a specific "cr_no" and appr_type of "RTP". the outer query then looks at the rownum of the second query
    Here is where I got the rownum information from;
    http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
    So here is what I think is happening;
    1. Main query From and Where are processed. This should provide the "set" for the query
    2.The from subqueries for RTP #1 and RTP #2 should be able to access the a.cr_mas_cr_no field and build a set from the approvals table.
    3.The RTP #1/2 subquery (inline maybe a better description?) would then get the correct row from the from subquery.
    The error "invalid identifier" refers to the a.cr_mas_cr_no field. I assume it means it can not resolve the table alias inside the subquery.
    So maybe your grouping would help, I will try.
    Sam

Maybe you are looking for

  • Enable Commenting Toolbar in Browser (doesn't work for IE / FF)

    I've seen a lot of chatter about this scenario but nothing seems to be working for me. What I want to do is this: Create a .pdf. Attach to the enterprise wiki software Confluence. Check-out in Confluence. Have the Commenting / Annotation toolbar avai

  • Connect Macbook to Sony Bravia HDTV via HDMI?

    I am trying to connect my Macbook to a Sony Bravia HDTV via HDMI, but are unable to get one to recognize the other. I am not sure what the problem is. I have the following set up: - Macbook 13" (2.16 GHz Intel Core 2, 10.4.11) - Apple Mini DVI to DVI

  • HT5671 first how do I access the app that will let me download apps?

    first how do I get the app on my phone that lets me download apps?

  • MIR4 attachment list pdf file

    Hello Gurus, my user has attached a pdf file in paked invoice using the attachment list button  . I can correctly see the pdf file using the FB03 transaction , but I can't see the pdf file  using the MIR4 . Is it normal ? Shouldn't I see the file als

  • Details on Exit plug

    Hi, I am working on Webdynpro for ABAP and would like to implement the Exit Plug functionality. Can any one provide me one sample program for my reference, so that it would be easy for my development. Regards, Ramya.