Oracle Database - Error (Ora-XXXXX)

> Database > Oracle Database

2 - ORA-12514: TNS: listener could not resolve SERVICE_NAME given in connect descrip

Cause See the Solution section of this document

Solution If you receive the message when testing database links: ORA-12514: TNS: listener could not resolve SERVICE_NAME given in connect descriptor either:

  • the database is shut down or
  • the tnsnames.ora file contains an incorrect SID or SERVICE_NAME.

Restart the database or correct the tnsnames.ora entries. Once you have resolved the problem, retest the link.

Advertising

3 - ORA-00942: table or view does not exist

Solution Verify that you are not connected as sysdba.

4 - ORA-12560: TNS:protocol adapter error

You may be have two databases in the same comnputer. Define the Oracle SID before attempting to connect.

Example :

C:\>sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Oct 31 15:03:30 2008
 
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
 
ERROR:
ORA-12560: TNS:protocol adapter error
 
 
Enter user-name:
C:\>set ORACLE_SID=ORCL
 
C:\>sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Oct 31 15:04:13 2008
 
Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
 
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL>

5 - ORA-30381: REWRITE_TABLE is not compatible with Oracle version

Cause: One or more column definitions in the REWRITE_TABLE is either missing or incompatible with the current Oracle version.

Action: Connect to the appropriate schema, DROP TABLE REWRITE_TABLE and recreate it by invoking the admin/utlxrw.sql script prior to invoking the DBMS_MVIEW.EXPLAIN_REWRITE() API.

SQL> DROP TABLE REWRITE_TABLE;
 
TABLE dropped.
 
Elapsed: 00:00:00.28
SQL> @C:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlxrw.SQL
 
TABLE created.
 
Elapsed: 00:00:00.03

6 - ORA-30476: PLAN_TABLE does not exist in the user"s schema

Cause: Estimate_Summary_Size uses Oracle SQL “EXPLAIN PLAN” command to estimate cardinality of the specified select-clause. This requires a table called the PLAN_TABLE in the user“s schema. For more information refer to the SQL Reference Manual.

Action: Create the PLAN_TABLE as described for EXPLAIN PLAN. On most systems a script utlxplan.sql will create this table.

SQL> DROP TABLE PLAN_TABLE;
 
TABLE dropped.
 
Elapsed: 00:00:00.28
SQL> @C:\oracle\product\10.2.0\db_1\RDBMS\ADMIN\utlxplan.SQL
 
TABLE created.
 
Elapsed: 00:00:00.03
Advertising

7 - ORA-30926: unable to get a stable set of rows in the source tables

Suppose you have a source and a destination table. You want to add the data to the value of any existing rows and insert any new rows.

    MERGE INTO tdest d
    USING tsrc s
    ON (s.srckey = d.destkey)
    WHEN MATCHED THEN
    UPDATE SET d.destdata = d.destdata + s.srcdata
    WHEN NOT MATCHED THEN
    INSERT (destkey,destdata) VALUES (srckey,srcdata)

Multiple inserts into the destination of the same key value from the source table will be allowed. However, there is a restriction that multiple updates to the same row in the destination table is not allowed. The following error will be returned if this is attempted:

    ORA-30926: unable to get a stable set of rows in the source tables
        Cause: A stable set of rows could not be got because of large dml
               activity or a non-deterministic where clause.
       Action: Remove any non-deterministic where clauses and reissue the dml.
db/oracle/ora_error.txt · Last modified: 2017/09/06 19:28 by gerardnico