ORA-00904 on upgrade of database

I was running without fix 10.2.0.1.0 Oracle x 64 on Windows XP x 64. Our philosophy of these products has been that if it ain't broke, don't break with updates, but we are forced to update by federal regulation. As we go through the trouble, we decided on 11.1.0.X to match all our other facilities.

I backed up the database before doing anything. I've migrated the ASM instance for 11.1.0.7 successfully. Then I patched the 10.2.0.5 database successfully, so that the zone versions would correspond. I started the all invalid objects recompile, but whenever I recompiled some, others would be present as invalid. I had a script that goes through this during about an hour before you abandon it, read somewhere that the upgrade process is recompiled invalid objects. After relinquishing to recompile everything, I put all the environment variables for the 11.1 database, and ran the upgrade of database. During the stage of "Upgrading Oracle Workspace Manager", I got an error ORA-00904 and messages on an invalid identifier and no data found. It gives me the option "Cancel" or "ignore".

I don't know what to do at this point. I didn't even know about the workspace far Manager. I guess by ignoring the error is not sure, but that is just, based on previous experiences of calculation. Give up everything to restore to the State it was in before the upgrade? I can restore the original software and restart the process, but I don't know what I have to do differently. I also ignored warnings of statistics the optimizer vitiated in schemas sys and sysman (after the collection of statistics for the whole of the base), patterns with objects dependent of network packets (the guide says to set the ACL after the upgrade) and a warning that the control of Enterprise Manager repository exists in the database (that I have not used since we first installed the base data).

OWM has a history of problems with upgrade. Ignore and it will be not upgraded after this upgrade 'failed' and it isn't a problem if you do not use. Of course, no one likes to discover such a problem, but after the end of the level and after the patch you should be able to upgrade the Workspace Manager simply with a performance of $ORACLE_HOME/rdbms/admin/owmupgrd.plb
http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28396/long_migrate.htm
(I suggest you reproduce the whole process on a test 10.2.0.5 database for make your own conclusion of course)

Published by: Philippe Florent Sep 19, 2010 01:07 - added link to the doc

Tags: Database

Similar Questions

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

    I have a PL/SQL script, processing of information between Oracle and MySQL databases. My script runs perfectly with DG4ODBC 11.1.0.7. Then we went from Oracle 10.2.0 and 11.2.0.2 DG4ODBC. Now, if I run my script from command line Solaris love. / 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 '. "the attempt": invalid identifier "

    The strange thing is that if I run the same query by cut and paste in sqlplus command line, the application works perfectly without any problems.

    What is the cause of this problem?

    Any help would be greatly appreciated.

    Jeffrey

    Hi Klaus,

    The problem has been resolved after I upgraded MySQL ODBC to a new version of 5.1.8 to 5.1.13.

    Summary of the problem and its solution:

    The problem: It seems 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 that I upgraded 5.1.13 MyODBC, my PL/SQL scripts all work.

    I need to point out that with that MyODBC 5.1.8, I can run queries and updates to SQL * more console, but now the PL/SQL scripts.

    I'm going to close this message.

    Once again, thank you and happy holidays.

    Jeffrey

  • ORA-00904: "ORA_ROWSCN": invalid identifier

    Get this error when trying to open tables in SQL Developer and data display.

    ORA-00904: "ORA_ROWSCN": invalid identifier

    Found a very old thread talking about this error, and now it's happening with me with SQL Developer Version on a Mac/Yosemite 4.1.1.19.

    https://community.Oracle.com/thread/1019844

    It happened for awhile and I didn't say anything because I can run a select statement * and get all the data I need. But it is bit boring so wonder if it's a bug that's resurfaced? Anyone else seeing this? Apparently not, because there seems to be no recent discussions on this subject, but maybe I'm not find them.

    Earl

    References to the built-in ORA_ROWSCN function should not return the message "invalid identifier" when connected to Oracle 10 g R1 or higher.  When you connect to a pre - 10 g R1, uncheck the box use ORA_ROWSCN for DataEditor insert and update statements in Tools > Preferences > Database > Object Viewerr.

    Edit:

    Oracle 10 g or higher, tables with a policy defined on them will know it: ORA-00904: 'ORA_ROWSCN': invalid makes unusable 2.1.0.63 output

    Edit2:

    More information, if you wish: using ora_rowscn on a table FGAC: bug?

  • ORA-00904: 'TIMESTAMPADD': identifier invalido

    Hi all.

    Can help you with this error?

    ORA-00904: 'TIMESTAMPADD': identifier invalido

    I am trying this:

    SELECT (timestampadd (SQL_TSI_MONTH, 3, TIMESTAMP ' 2010-11-30 10:00:00 ')) FROM dual;

    TKS

    Simone

    Hello.

    Sorry for my confusion.

    It is a Timesten database. Not an oracle database.

    REF. http://docs.oracle.com/en/database/

    Tkss

  • SDO ORA-00904 identifier valid after patch 20544696 and 20225988 (CPU Apr 15)

    The seller of our web mapping system uses a syntax that contains the identifier SDO_GEOM. SDO_GEOMETRY and similar. An example simplified using the point constructor ODD as in...
    Select sdo_geom.sdo_geometry (2001, 81989, sdo_geom.sdo_point_type (531599, 184530, null), null, null) double;

    This syntax has stopped working in the TEST database, after I applied the patches April 2015 CPU. It generates an ORA-00904: "SDO_GEOM. "" SDO_GEOMETRY ': identifier not valid, which in fact I was expecting. The package SDO_GEOM in schema MDSYS, often referenced without the option scheme by the public synonym, do not contain a type or function SDO_GEOMETRY. I've never used this syntax and wrote instead...

    Select mdsys.sdo_geometry (2001, 81989, mdsys.sdo_point_type (531599, 184530, null), null, null) double;

    .. of course, who continues to work. However, to my surprise, I found that the syntax of the provider, which generates the ORA-00904 in all databases of fix post, works perfectly well in all our pre patch databases.

    Is the same for all other types in the MDSYS (SDO_ELEM_INFO_ARRAY, SDO_ORDINATE_ARRAY...) schema.

    I'm dealing with the strange situation where I not only understand why something has stopped working; first of all I do not understand why the syntax of the seller has already worked.

    We are using Oracle 11.2.0.4 EE with Oracle Spatial on Windows Server 2008 R2 64-bit. Patches that have been requested are

    1) patch 20544696: WINDOWS DB BUNDLE PATCH 11.2. 0.4.15
    2) patch 20225988: WINDOWS ORACLE JAVAVM COMPONENT BUNDLE PATCH 11.2. 0.4.3

    Kind regards

    Torsten

    Hi Torsten,

    Well, here you have a kind of strange thing Oracle Spatial.  If you told me that

    SELECT SDO_GEOM.SDO_GEOMETRY(2001, 81989, SDO_GEOM.SDO_POINT_TYPE(531599, 184530, NULL), NULL, NULL) FROM dual;
    

    is a valid statement, I'd say of course not. But on my production server which is the power supply 11.2.0.4.5, it works!

    However, on a 12 c test server it does not work.

    All I can say is that you are right in everything you say.  Oracle has removed everything that made this weird syntax once the work and it seems that the PSU April stops for good.  Your provider needs to fix things and perhaps address why they used such a weird thing in the first place.

    Like you I don't see what makes this function on 11g.  There is no synonym that I see.  And if wrap you it in an anonymous block fails

    DECLARE
       foo SDO_GEOMETRY;
    BEGIN
       SELECT SDO_GEOM.SDO_GEOMETRY(2001,81989,SDO_GEOM.SDO_POINT_TYPE(531599,184530,NULL),NULL,NULL)
       INTO foo
       FROM dual;
    END;
    /
    

    Strange thing indeed.  I guess there could be a wider discussion here on what patches are in turn brought in 11g and if the side effects are always worth.

    See you soon,.

    Paul

  • ORA-00904: "YYYY": invalid identifier using impdp

    Hello

    I am trying to import a part of a table to another table on the remote database using impdp:

    Impdp directory of centrumadmin/centrumadmin = network_link DUMP_LOG_DIRECTORY LOGFILE = backup_2014_01.log = REF2ISKNE = 'AUD$ _BACKUP' content TABLES = QUERY DATA_ONLY =------"WHERE \" NTIMESTAMP # "> to_date\ (January 2, 2014","DD-MM-YYYY '------") "------"; "

    But still get this error:

    Start "CENTRUMADMIN". "' SYS_IMPORT_TABLE_01 ': centrumadmin / * directory = network_link DUMP_LOG_DIRECTORY LOGFILE = backup_2014_01.log = REF2ISKNE TABLES = AUD$ happy _BACKUP = DATA_ONLY QUERY =" WHERE NTIMESTAMP # > to_date (02-2014, MM-YYYY) ""

    Current estimation using BLOCKS method...

    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA

    Total estimation using BLOCKS method: 4,473 GB

    ORA-31693: Data Table object 'CENTRUMADMIN '. "" AUD$ _BACKUP "could not load/unload and being ignored because of the error:

    ORA-00904: "YYYY": invalid identifier

    Work "CENTRUMADMIN". "" SYS_IMPORT_TABLE_01 "completed with error (s 1) to Wed Feb 11 09:32:15 2015 elapsed 0 00:00:03

    Any ideas? If I change the date format YYYY-MM-DD or the other, always error is in the last part: ORA-00904: "DD": invalid identifier.

    Thank you.

    Honza

    Hi Mika,

    have you played around with some double 'or triple?

    as

    to_date\ ("02/01/2014","DD-MM-YYYY"------)-«;»

    concerning

    Kay

  • PL/SQL: ORA-00904: invalid identifier

    Hello

    Run the script after and encountered the error.

    SQL > create or replace FUNCTION p_CQTicketUsu

    () 2

    3 v_TicketUserID IN NUMBER by DEFAULT NULL,-it's the [CQTicketUsers]. TicketUserID generated on update

    4 v_TicketID IN NUMBER by DEFAULT NULL,-it's the [CQTicketUsers]. TicketID update

    5 v_AdminUserID IN NUMBER by DEFAULT NULL,-it's the [CQTicketUsers]. AdminUserID update

    6 v_TicketUserTypeID IN NUMBER by DEFAULT NULL - this is the [CQTicketUsers]. TicketUserTypeID update

    7)

    8 RETURN NUMBER

    9, ACCORDING TO

    10 v_sys_error NUMBER: = 0;

    11 v_ERRSQL NUMBER (10,0);

    12 v_UpdCount NUMBER (10,0);

    13

    BEGIN 14

    15

    16 UPDATE CQTicketUsers

    17 SET v_TicketUserID = TicketUserID,

    18 v_TicketID = TicketID,

    19 v_AdminUserID = AdminUserID,

    20 v_TicketUserTypeID = TicketUserTypeID

    21 WHERE TicketUserID = v_TicketUserID;

    22 v_ErrSQl: = v_sys_error;

    23 v_UpdCount: = SQL % ROWCOUNT;

    24 IF v_ErrSQL <>0 THEN

    25 RETURN-1;

    26 END IF;

    27 IF v_Updcount < 1 THEN

    28 RETURN - 2;

    29 END IF;

    30 RETURN 0;

    ENDS 31;

    32.

    WARNING: Function created with compilation errors.

    SQL > show error

    Errors for the P_CQTICKETUSU FUNCTION:

    16/4 PL/SQL: statement ignored

    20/11 PL/SQL: ORA-00904: "V_TICKETUSERTYPEID": invalid identifier

    Please note, I said v_TicketUserTypeID to the #6 line. Advice kindly.

    Kind regards

    Ballanger

    It's going to be kind of embarrassing, but you have the update parameters reversed. It should be

    TicketUserTypeID = v_TicketUserTypeID

    and is not

    v_TicketUserTypeID = TicketUserTypeID

    You get this error for database columns not only for pl/sql variables.

  • With the help of the ORA-00904 granted by ROLE

    Hi all

    I have an error using the grant through ROLE (Oracle 11.2.0.1 on redhat Linux)

    Here is the explanation of my problem:

    I create a package to wear patterns

    create or replace 
    PACKAGE                     usera.pkg_utils AS 
     function f_my_function return RAW;
    END pkg_utils;
    

    I create the package body:

    create or replace 
    PACKAGE BODY usera.pkg_utils  AS 
     function f_my_function return RAW  is
      v_uuid RAW(16);
    begin
      v_uuid := sys.dbms_crypto.randombytes(16);
      return (utl_raw.overlay(utl_raw.bit_or(utl_raw.bit_and(utl_raw.substr(v_uuid, 7, 1), '0F'), '40'), v_uuid, 7));
    end f_random_uuid;
    END pkg_utils;
    

    I create a 'R_ROLE1' role to which I admit "EXECUTE ON USERA. PKG_UTILS TO R_ROLE1.

    I give you that R_ROLE1 to the PUBLIC so that each user can access the package USERA. PKG_UTIS

    If I call another user f_my_function, it works well.

    If I call another user from a procedure f_my_function I get "ORA-00904".

    ex: to UserB

    create or replace 
    PROCEDURE P_PROC
    AS
    num int;
    uuid_ RAW(16);
    BEGIN
        select usera.pkg_utils.f_my_function() into uuid_ from dual;
    END P_PROC;
    /
    

    If I give you that directly "GRANT EXECUTE ON USERA. PKG_UTILS TO PUBLIC' so it works well.

    Thus, the error comes from the fact that I use a role, but I can't fix it. I don't understand why USERB does not use its grant to the role of r_role1 granted to PUBLIC.

    Is there something as USERB is unusable cascade role during the call to a procedure? is there something to "activate"? ".

    Thank you all

    See the doc database security for your answer and the explanation of what others have said.

    http://docs.Oracle.com/CD/B28359_01/network.111/B28531/authorization.htm#i1007304

    Operation of the roles in PL/SQL blocks

    The use of roles in a PL/SQL block depends on if it is an anonymous block, or a block named (stored procedure, function, or trigger), and if it runs with the rights of the author or the rights of the applicant.

    Roles used in the appointed with rights to define blocks

    All roles are disabled in any PL/SQL block named (stored procedure, function, or trigger) that runs with the rights of the author. Roles are not used to privilege control, and you cannot define roles within the procedure of a DEFINER rights.

    The SESSION_ROLES view shows all roles that are currently enabled. If a named PL/SQL block that runs with Definer Rights queries SESSION_ROLES , then the query will return no rows.

  • 1.5 to 1.5.1 Unable to upgrade the database

    Hi all

    I received an error in the 1.5.1 release 1.5.0.

    [0;root@vcloud:/home/iconsys[root@vcloud iconsys]] # / opt/vmware/vcloud-director/bin/upgrade

    Welcome to the vCloud Director upgrade utility

    This utility will apply several updates of the database. Please

    make sure that you have created a backup of your database before you continue.

    You want to upgrade the product now? [Y/N] Y

    Review database at the URL: jdbc:oracle:thin:@192.168.1.26:1521/orcl

    Apply lots of upgrade 1

    Upgrade to run batch: 1.5 to 1.5.1

    The file SQL statements executing: Upgrade_Data_15_151.sql [17 statements]

    .............. Impossible to upgrade the database: java.sql.SQLException: SQL query execution error: 'CALL create_missing_index()'



    -Upgrade.log

    2012-03-28 00:46:26, 490 | INFO | main                      | UpgradeAgent | Welcome to the vCloud Director upgrade utility

    This utility will apply several updates of the database. Please

    make sure that you have created a backup of your database before you continue.

    |

    2012-03-28 00:46:28, 920. INFO | main                      | UpgradeAgent | Review database at the URL: jdbc:oracle:thin:@192.168.168.216:1521/orcl.

    2012-03-28 00:46:30, 453. INFO | main                      | UpgradeAgent | Apply lots of upgrade 1 |

    2012-03-28 00:46:30, 453. INFO | main                      | UpgradeAgent | Upgrade to run batch: 1.5 to 1.5.1 |

    2012-03-28 00:46:34, 464 | ERROR | main                      | UpgradeAgent | Could not upgrade the database: java.sql.SQLException: SQL query execution error: "CALL create_missing_index()" |

    com.vmware.vcloud.upgrade.UpgradeAgentException: java.sql.SQLException: SQL query execution error: "CALL create_missing_index()".

    at com.vmware.vcloud.upgrade.UpgradeAgent.executeUpgrade(UpgradeAgent.java:393)

    at com.vmware.vcloud.upgrade.UpgradeAgent.start(UpgradeAgent.java:535)

    at com.vmware.vcloud.upgrade.UpgradeAgent.main(UpgradeAgent.java:449)

    Caused by: java.sql.SQLException: SQL query execution error: "CALL create_missing_index()".

    at com.vmware.vcloud.common.install.SQLScriptExecutor.executeStatements(SQLScriptExecutor.java:134)

    at com.vmware.vcloud.common.install.SQLScriptExecutor.executeSqlBatch(SQLScriptExecutor.java:95)

    at com.vmware.vcloud.upgrade.UpgradeAgent.applySQLBatches(UpgradeAgent.java:742)

    at com.vmware.vcloud.upgrade.UpgradeAgent.executeUpgrade(UpgradeAgent.java:384)

    ... 2 more

    Caused by: java.sql.SQLException: ORA-01452: cannot CREATE a UNIQUE INDEX. duplicate keys found

    ORA-06512: at "VCLOUDUSER. CREATE_MISSING_INDEX', line 17

    Thank you very much!

    -david

    Please try to run the following

    SELECT object_id, object_type, category, status, count (*) AS DUP OF
    object_condition GROUP of object_id, object_type, category, HAVING condition
    Count (*) > 1;

    If you find run a copy of this

    DELETE FROM object_condition WHERE object_id IN (SELECT object_id FROM object_condition GROUP BY category, condition, object_type and object_id HAVING count (*) > 1);

    Good luck

  • ORA-00904 on GATHER_STATS_JOB

    I get the following error on the log of alerts on my recovery catalog database.
    Here are the lines of trace file:
    SERVICE NAME:(SYS$USERS) 2012-09-18 23:00:57.879
    SESSION ID: (103.51932) 2012-09-18 23:00:57.879
    ORA-00904: "T1". "" SYS_DS_ALIAS_15 ": invalid identifier
    2012-09-18 23:00:57.888
    GATHER_STATS_JOB: GATHER_TABLE_STATS ('"SYS" "," "WRI$ _OPTSTAT_HISTGRM_HISTORY" ',' ""',...)
    ORA-00904: "T1". "" SYS_DS_ALIAS_15 ": invalid identifier
    2012-09-18 23:01:15.569

    Any help will be appreciated.

    Workaround solution:
    Method of change together.
    for example: use this product for the stats to pick a different option.

    It should works very well by changing the ESTIMATE_PERCENT at 100 or 70 for example.

  • ORA-00904: "QRYJOINOPTIMIZE": invalid identifier

    Hello
    FCSM90 when you run the import script Data Mover I have the following:
     
    File: E:\pt85205b-retail\peopletools\src\pssys\qdmget.cppSQL error. Stmt #: 3024  Error Position: 377  Return:
     904 - ORA-00904: "QRYJOINOPTIMIZE" : identificateur non valide 
    Failed SQL stmt:SELECT VERSION, QRYTYPE,    SELCOUNT, EXPCOUNT, BNDCOUNT, QRYVALID, DESCR, TO_CHAR(CAST((LASTUPDDTTM) AS TIMESTAMP),'YYYY-MM-DD-HH24.MI.SS.FF'),    LASTUPDOPRID, QRYAPPROVED, CREATEOPRID, TO_CHAR(CAST((CREATEDTTM) AS TIMES-TAMP),'YYYY-MM-DD-HH24.MI.SS.FF'),    APPROVEOPRID, TO_CHAR(CAST((APPROVEDTTM) AS TIMESTAMP),'YYYY-MM-DD-HH24.MI.SS.FF'), EXECLOGGING, QRYDISABLED, QRYFOL-DER,QRYJOINOPTIMIZE,DESCRLONG    FROM PSQRYDEFN    WHERE OPRID = :1    AND QRY-NAME = :2 
    I found something understandable on metalink.
    Do you have any idea?
    Thank you.

    What you trying to do? A creation of the database?
    Or is it something else, like a db and import export in another? In this case, what is the source PTools and PTools version of target version?
    I checked in one of our 8.48, the QRYJOINOPTIMIZE column is not there, but exists in 8.51.
    Please give more details.

    Nicolas.

  • Gateway to Oracle ORA-00904: invalid identifier - how to fix it

    Database: 11.2.0 32-bit Windows (under Windows XP SP3)

    ORACLE_HOME = D:\Oracle\Product\11.2.0\dbhome
    GATEWAY_HOME = D:\Oracle\Product\11.2.0\gw

    ODBC: SQL Server (works... I can import the data from the table in MS Excel) its ok...
    ODBC: dg4msql (works... I can import the data from the table in MS Excel) its ok...



    Oracle GateWay listening port

    D:\Oracle\Product\11.2.0\gw\NETWORK\ADMIN

    listener.ora # Network Configuration file: D:\Oracle\Product\11.2.0\gw\network\admin\listener.ora
    # Generated by Oracle configuration tools.

    SID_LIST_GWLISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = dg4msql)
    (ORACLE_HOME = D:\Oracle\Product\11.2.0\gw)
    (ENVS = "EXTPROC_DLLS=ONLY:D:\Oracle\Product\11.2.0\gw\bin\oraclr11.dll")
    (PROGRAM = dg4msql)

    )

    (SID_DESC =
    (SID_NAME = dg4msql)
    (ORACLE_HOME = D:\Oracle\Product\11.2.0\gw)
    (PROGRAM = dg4msql)
    )
    )


    GWLISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = CIP)(KEY = EXTPROC1522))
    (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.90)(PORT = 1522))

    )
    )

    ADR_BASE_GWLISTENER = D:\Oracle\Product\11.2.0\gw


    Gateway listener status

    LSNRCTL > status GWLISTENER
    Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1522)))
    STATUS of the LISTENER
    ------------------------
    Alias GWLISTENER
    Version TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Prod
    ction
    Start date October 13, 2011 11:36:16
    Uptime 0 days 0 h 29 min 43 sec
    Draw level off
    Security ON: OS Local Authentication
    SNMP OFF
    Listener parameter File D:\Oracle\Product\11.2.0\gw\network\admin\listener.ora

    D:\oracle\product\11.2.0\gw\diag\tnslsnr\appsdba\gwlis log listener
    tener\alert\log. XML
    Summary of endpoints listening...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1522ipc)))
    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp (PORT = 1522))(HOST=192.168.0.90)))
    Summary of services...
    Service 'dg4msql' has 1 instance (s).
    Instance of 'dg4msql', status UNKNOWN, has 2 managers of this service...
    The command completed successfully
    LSNRCTL >


    D:\Oracle\Product\11.2.0\gw\network\admin\sqlnet.ora

    sqlnet.ora # Network Configuration file: D:\Oracle\Product\11.2.0\gw\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.

    # This file is actually generated by netca. But if customers can opt for
    # install 'Software Only', this file does not exist and without the native
    authentication #, they will not be able to connect to the database on NT.


    SQLNET. AUTHENTICATION_SERVICES = (NTS)

    NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT)


    D:\Oracle\Product\11.2.0\gw\dg4msql\admin\initdg4msql.ora

    # This is a custom agent init file which contains the parameters of HS
    # which are necessary for the Microsoft SQL Server database gateway

    #
    # HS init parameters
    #
    #HS_FDS_CONNECT_INFO=[192.168.0.8]/SRV-TULIP/WZHRM
    HS_FDS_CONNECT_INFO=192.168.0.8,1433//wzhrm

    HS_FDS_TRACE_LEVEL = OFF
    HS_FDS_RECOVERY_ACCOUNT = RECOVERY
    HS_FDS_RECOVERY_PWD = RECOVERY


    ---------------------------------------------------------------------------------------------------------------------------------------------------

    D:\Oracle\Product\11.2.0\dbhome\NETWORK\ADMIN\tnsnames.ora

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.90)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )


    PROD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.0.230) (PORT = 1521))
    (CONNECT_DATA = (SID = PROD))
    )

    SqlServer =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp)(HOST=192.168.0.90) (PORT = 1521))
    (CONNECT_DATA =
    (SID = SqlServer))
    (HS = OK)
    )

    dg4msql =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = tcp (PORT = 1522))(HOST=192.168.0.90))
    (CONNECT_DATA = (SID = dg4msql))
    (HS = OK)
    )



    Link to database

    create database link dg4msql connect to usroracle identified by usroracle using 'dg4msql ';


    1 * Select in rvwHLoanApp@dg4msql*
    SQL > /.

    empId description
    ------ ---------------------------------------------------------
    Mr. Ali Jawad 0001
    0002 M. Imran Farooq
    0003 M. Ali elmardi
    Mr. Mujahid Muhammad 0004
    0005 M. Vassallo Malik
    Mr. Kashif Imran 0006
    Mr. Adeel Sadiq 0009

    empId description
    ------ ---------------------------------------------------------
    Mr. Hafiz Muhammad Bilal 0010
    Mr. Asif Ahmad Arif 0012
    Mr. Muhammad Akram 0018
    0019 Mr. Aftab Hussain
    Mr. Johann Ménard Attari 0020
    Mr. Adnan Saleem Raza 0022
    0023 Mr. Badar-Uz-Zaman

    15 selected lines.

    When to try for some clumns his watch an error. Where the problem lies

    SQL > select empId from rvwHLoanApp@dg4msql;
    Select empId from rvwHLoanApp@dg4msql
    *
    ERROR on line 1:
    ORA-00904: "EMPID": invalid identifier


    SQL > select empId, description of rvwHLoanApp@dg4msql;
    Select empId, rvwHLoanApp@dg4msql description
    *
    ERROR on line 1:
    ORA-00904: "DESCRIPTION": invalid identifier


    SQL >


    SQL >


    Waiting for relief. What thing im missing...

    Naeem,
    SQL * Server is case-sensitive for object names must surround the names of columns with double quotes to preserve the case sent to SQL * Server.

    Select 'empId', 'description' of the rvwHLoanApp@dg4msql;

    According to the SQL * Server configuration, you might also need to surround the name of the table in quotes also.

    Select "empId", "description" "rvwHLoanApp"@dg4msql;

    but this is not necessary in your configuration.

    Kind regards
    Mike

  • ORA-00904: "DATETIME": invalid identifier

    Hello

    I implemented a heterogeneous link to a server database mssql (latest version of FreeTDS and UnixODBC on a SunOS Sparc machine) which works very well but with the exception of the datetime columns. When I select all the columns using the * I get only the columns which are not defined as a DATETIME data type in MSSQL. When I specifically choose a datetime column I get error: ORA-00904: "DATETIME": invalid identifier

    Any of you guys ever face the same problems?

    Thanks for any help!
    Davy

    First to know the data types that are not supported by DG4ODBC or HSODBC are simply cut from the selection list.

    Your table 'TEST_DATE1 '.
    contains these 3 columns:

    [ODBC] [9575] [1317899606.754841] [SQLDescribeCol.c] [497]
    Output: [SQL_SUCCESS]
    Column name = [tdatetime]
    Data type = ffbfd948-> 93-online Data type 93 is the ODBC SQL_TYPE_TIMESTAMP data type
    Column size = ffbfd944-> 23
    Decimal digits = ffbfd942-> 3
    Nullable = ffbfd940-> 0

    [ODBC] [9575] [1317899606.754934] [SQLDescribeCol.c] [497]
    Output: [SQL_SUCCESS]
    Column name = [ttext]
    Data type = ffbfd948-> 1-online data of type 1 is the ODBC name data type
    Column size = ffbfd944-> 100
    Decimal digits = ffbfd942-> 0
    Nullable = ffbfd940-> 0
    and
    [ODBC] [9575] [1317899606.755086] [SQLDescribeCol.c] [497]
    Output: [SQL_SUCCESS]
    Column name = [tsmalldatetime]
    Data type = ffbfd948-> 93-online Data type 93 is the ODBC SQL_TYPE_TIMESTAMP data type
    Column size = ffbfd944-> 16
    Decimal digits = ffbfd942-> 0
    Nullable = ffbfd940-> 0

    => When you now see the manual of DG4ODBC or as in your case HSODBC-online Appendix B - mapping of the Data Type for the generic connectivity
    It lists the supported data types, and it lists timestamp (which is equal to 11 years - not SQL_TYPE_TIMESTAMP 93) as a supported data type. As HSODBC does not support this type of data, it will be simply left in the select list to at least allow to select all other types of data as in your case, the column ttext.

    You will find also documented in a note of My Oracle Support: how to determine why certain types of foreign data are not displayed in a select using DG4ODBC or HSODBC (Doc ID 252548.1)

    Published by: kgronau on October 6, 2011 13:37

    the root cause of the problem is the ODBC - the ODBC driver is responsible for mapping and FreeTDS is commonly mapping to SQL_TYPE_TIMESTAMP while DataDirect and other commercial vendors map to timestamp.

    Published by: kgronau on October 6, 2011 13:49
    and here is the link for the manual HSODBC: http://download.oracle.com/docs/cd/B19306_01/server.102/b14232.pdf

  • ORA-00904: "MSC_GET_NAME." "" LOT_NUMBER_FOR_DEMAND ": invalid identifier

    Dear all,

    Object invalid "MSC_ORDERS_V_1" after the upgrade to 12.1.3

    NAME OF THE TEXT
    ------------------------------ ----------------------------------------------------------------------------------
    MSC_ORDERS_V_1 ORA-00904: "MSC_GET_NAME." "" LOT_NUMBER_FOR_DEMAND ": invalid identifier

    Thank you
    Jackie

    Object invalid "MSC_ORDERS_V_1" after the upgrade to 12.1.3

    NAME OF THE TEXT
    ------------------------------ ----------------------------------------------------------------------------------
    MSC_ORDERS_V_1 ORA-00904: "MSC_GET_NAME." "" LOT_NUMBER_FOR_DEMAND ": invalid identifier

    According to eTRM site http://etrm.oracle.com this seems to be a custom object. So, please ask developers to examine the code and fix it.

    Thank you
    Hussein

  • What's * NOT * less out error with ORA-00904?

    SQL> select * from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Beta
    PL/SQL Release 11.2.0.2.0 - Beta
    CORE    11.2.0.2.0      Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Beta
    NLSRTL Version 11.2.0.2.0 - Production
    
    
    
    SQL> drop table t1;
    
    Table dropped.
    
    SQL> drop table t2;
    
    Table dropped.
    
    SQL> create table t1 (some_order_line_id number);
    
    Table created.
    
    SQL> create table t2 (order_line_id number);
    
    Table created.
    
    SQL> SELECT order_line_id FROM t1
      2  /
    SELECT order_line_id FROM t1
           *
    ERROR at line 1:
    ORA-00904: "ORDER_LINE_ID": invalid identifier
    
    
    SQL> SELECT * FROM t2 WHERE order_line_id IN (SELECT order_line_id FROM t1);
    
    no rows selected
    
    SQL>
    If it's in the manual, please point to me. I fully expect it give me the error the second time around.

    PS:
    It was the same in 11 GR 2 Enterprise Edition too.

    Published by: RPuttagunta on August 16, 2011 12:53

    No, you cannot rewrite the query it.

    SELECT * FROM t2 WHERE t2.order_line_id IN (SELECT t2.order_line_id FROM t1);
    

    would be equivalent to

    SELECT *
      FROM t2
     WHERE t2.order_line_id IS NOT NULL
       AND EXISTS (
        SELECT 1
          FROM t1
        )
    

    If you assume that T1 has at least one line and that T2. ORDER_LINE_ID is NOT NULL, it is equivalent to

    SELECT *
      FROM t2
    

    For each row in T2, Oracle would choose the T2. ORDER_LINE_ID of T1. Assuming that T1 has at least one line and that ORDER_LINE_ID is NOT NULL, it will come back N rows with values not equal NULL (1 row for each row of T1). The IN, by definition, could be set to TRUE.

    Thus, while it is a valid syntax, it is very unlikely that the syntax that you'd really like.

    Justin

Maybe you are looking for