我用的是RED HAT LINUX6.2, 作为WEB服务器,数据库在另一台LINUX服务器上

解决方案 »

  1.   

    ORA-12154
    TNS:could not resolve service name 
    This error message occurs when a user attempts to logon to an Oracle database. It means that the Oracle communications software (SQL*Net) did not recognize the database name specified. (This is the name entered in the third field of the ORACLE logon box.)For a database name to be recognized, it must be entered in a file called tnsnames.ora. Some users have their own copies of this file stored on their local hard disks. Others use a shared version kept on the Banner forms server. To deal with an ORA-12154 error: Check that the database name is being spelled correctly. See the table of standard names for the Banner databases. (The names are found in the column headed "Alias".) 
    If the database name is being entered correctly as per the Banner list, then the user must have a local version of tnsnames.ora (unless someone has messed up the shared version). In that case, the local tnsnames.ora needs to be updated with the missing database(s) using the SQL*Net Easy Configuration utility. 
    Start>Programs>Oracle for Windows xx>SQL Net Easy Configuration. 
    Select the option to Add a new database alias. ("Alias" is EasyConfig's term for the database name.) 
    Enter the database parameters according to the table. 
    Confirm the new alias. 
    Repeat for as many aliases as needed. 
    Exit EasyConfig. 
    For non-Banner database names, please contact the database administrator concerned. (The Banner/ISR DBA group, available through the Banner Help Desk [4925] or the ISR Help Desk [4332], can assist with the shared tnsnames.ora file.) 
    Technical note which hopefully won't affect you: To make things more complicated, the database names entered in tnsnames.ora are actually arbitrary. In other words, different versions of the file can use different names for the same database. Of course we encourage everyone to use the same names, but there are people who use different names (often for historical reasons). So it's quite possible that the desired database exists in tnsnames.ora, but under a different name than expected.