Oracle8 Error Messages Release 8.0.4 A58312-01 |
|
This section lists some of the messages generated when SQL statements are parsed by the Oracle Server. Most, but not all, messages in this section indicate incorrect SQL syntax. For SQL syntax, refer to Oracle8 Server SQL Reference.
If you are using Trusted Oracle, see the Trusted Oracle documentation for information about error messages in that environment.
Cause: The statement is not recognized as a valid SQL statement. This error can occur if the Procedural Option is not installed and a SQL statement is issued that requires this option; for example, a CREATE PROCEDURE statement. You can determine if the Procedural Option is installed by starting SQL*Plus. If the PL/SQL banner is not displayed, then the option is not installed.
Action: Correct the syntax or install the Procedural Option.
Cause: The CREATE command was not followed by a valid CREATE option.
Action: Correct the syntax.
Cause: The datatype entered in the CREATE or ALTER TABLE statement is not valid.
Action: Correct the syntax.
Cause: A table or cluster name is invalid or does not exist. This message is also issued if an invalid cluster name or no cluster name is specified in an ALTER CLUSTER or DROP CLUSTER statement.
Action: Check spelling. A valid table name or cluster name must begin with a letter and may contain only alphanumeric characters and the special characters $, _, and #. The name must be less than or equal to 30 characters and cannot be a reserved word.
Cause: The column name entered is either missing or invalid.
Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, it must be enclosed in double quotation marks. It may not be a reserved word.
Cause: A required keyword is missing.
Action: Correct the syntax.
Cause: A required left parenthesis has been omitted. Certain commands, such as CREATE TABLE, CREATE CLUSTER, and INSERT, require a list of items enclosed in parentheses. Parentheses also are required around subqueries in WHERE clauses and in UPDATE table SET column = (SELECT...) statements.
Action: Correct the syntax, inserting a left parenthesis where required, and retry the statement.
Cause: A left parenthesis has been entered without a closing right parenthesis, or extra information was contained in the parentheses. All parentheses must be entered in pairs.
Action: Correct the syntax and retry the statement.
Cause: Either of the following: In a CREATE TABLE or ALTER TABLE statement, NOT was entered to specify that no null values are allowed in that column, but the keyword NULL was omitted. In the IS [NOT] NULL logical operator, the keyword NULL was not found. For example, the following statement generates this message:
SELECT * FROM EMP WHERE DEPTNO IS NOT;The keyword NULL must follow the keywords IS NOT.
Action: Correct the syntax.
Cause: An Oracle function was referenced with an incorrect number of arguments. All Oracle functions, except for SYSDATE, require at least one argument.
Action: Correct the syntax of the function by entering the required number of arguments.
Cause: No size was specified for a character field or the size was invalid. A maximum length must be specified for each character column. The maximum value for this length varies for each character datatype, such as CHAR or VARCHAR2.
Action: Enter a maximum length for the field.
Cause: Special characters are valid only in certain places. If special characters other than $, _, and # are used in a name and the name is not enclosed in double quotation marks ("), this message will be issued. One exception to this rule is for database names; in this case, double quotes are stripped out and ignored.
Action: Remove the invalid character from the statement or enclose the object name in double quotation marks.
Cause: The SQL statement requires two sets of values equal in number. This error occurs when the second set contains more items than the first set. For example, the subquery in a WHERE or HAVING clause may return too many columns, or a VALUES or SELECT clause may return more columns than are listed in the INSERT.
Action: Check the number of items in each set and change the SQL statement to make them equal.
Cause: The keyword ADD does not precede one of the following:
Action: Specify the keyword ADD in the ALTER statement.
Cause: This is an internal error message not usually issued.
Action: Contact customer support.
Cause: A required comma has been omitted from a list of columns or values in an INSERT statement or a list of the form ((C,D),(E,F), ...).
Action: Correct the syntax.
Cause: A column name used in a join exists in more than one table and is thus referenced ambiguously. In a join, any column name that occurs in more than one of the tables must be prefixed by its table name when referenced. The column should be referenced as TABLE.COLUMN or TABLE_ALIAS.COLUMN. For example, if tables EMP and DEPT are being joined and both contain the column DEPTNO, then all references to DEPTNO should be prefixed with the table name, as in EMP.DEPTNO or E.DEPTNO.
Action: Prefix references to column names that exist in multiple tables with either the table name or a table alias and a period (.), as in the examples above.
Cause: An entry was formatted like a function call, but it is not recognizable as an Oracle function.
Action: Correct the syntax.
Cause: A search condition was entered with an invalid or missing relational operator.
Action: Include a valid relational operator such as =, !=, ^=, <>, >, <, >=, <=, ALL, ANY, [NOT] BETWEEN, EXISTS, [NOT] IN, IS [NOT] NULL, or [NOT] LIKE in the condition.
Cause: The SQL command was not complete. Part of a valid command was entered, but at least one major component was omitted.
Action: Correct the syntax.
Cause: An invalid option was specified in defining a column or storage clause. The valid option in specifying a column is NOT NULL to specify that the column cannot contain any NULL values. Only constraints may follow the datatype. Specifying a maximum length on a DATE or LONG datatype also causes this error.
Action: Correct the syntax. Remove the erroneous option or length specification from the column or storage specification.
Cause: In a SELECT or REVOKE statement, the keyword FROM was either missing, misplaced, or misspelled. The keyword FROM must follow the last selected item in a SELECT statement or the privileges in a REVOKE statement.
Action: Correct the syntax. Insert the keyword FROM where appropriate. The SELECT list itself also may be in error. If quotation marks were used in an alias, check that double quotation marks enclose the alias. Also, check to see if a reserved word was used as an alias.
Cause: The keyword BY was omitted in a GROUP BY, ORDER BY, or CONNECT BY clause. In a GRANT statement, the keyword IDENTIFIED must also be followed by the keyword BY.
Action: Correct the syntax. Insert the keyword BY where required and then retry the statement.
Cause: An INSERT statement has been entered without the keyword INTO.
Action: Correct the syntax. Insert the keyword INTO where required and then retry the statement.
Cause: An INSERT statement has been entered without the keyword VALUES or SELECT. Either a VALUES clause or a SELECT subquery must follow the INSERT INTO clause.
Action: Correct the syntax. Enter either a VALUES clause or a subquery after the INSERT INTO clause.
Cause: An equal sign has been omitted in one of the following places:
Action: Correct the syntax. Insert the equal sign where required and retry the statement.
Cause: A SELECT subquery must be included in a CREATE VIEW statement.
Action: Correct the syntax. Insert the required SELECT clause after the CREATE VIEW clause and then retry the statement.
Cause: This is an internal error message not usually issued.
Action: Contact customer support.
Cause: This is an internal error message not usually issued.
Action: Contact customer support.
Cause: This is an internal error message not usually issued.
Action: Contact customer support.
Cause: Either
Action: If the cause is
Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement. ORDER BY cannot be used to create an ordered view or to insert in a certain order. Also, an improper SQL ending occurs if IN clause is used with only one argument (IN(X), for example). An IN clause must have two or more arguments.
Action: Correct the syntax by removing the inappropriate clauses. It may be possible to duplicate the removed clause with another SQL statement. For example, to order the rows of a view, do so when querying the view and not when creating it. This error can also occur in SQL*Forms applications if a continuation line is indented. Check for indented lines and delete these spaces.
Cause: One of the group functions, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, was used in a WHERE or GROUP BY clause.
Action: Remove the group function from the WHERE or GROUP BY clause. The desired result may be achieved by including the function in a subquery or HAVING clause.
Cause: This is an internal error message not usually issued.
Action: Contact customer support.
Cause: A required part of a clause or expression has been omitted. For example, a SELECT statement may have been entered without a list of columns or expressions or with an incomplete expression. This message is also issued in cases where a reserved word is misused, as in SELECT TABLE.
Action: Check the statement syntax and specify the missing component.
Cause: A SELECT list cannot include both a group function, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, and an individual column expression, unless the individual column expression is included in a GROUP BY clause.
Action: Drop either the group function or the individual column expression from the SELECT list or add a GROUP BY clause that includes all individual column expressions listed.
Cause: The function was referenced with too few arguments.
Action: Check the function syntax and specify the required number of arguments.
Cause: The function was referenced with too many arguments.
Action: Check the function syntax and specify only the required number of arguments.
Cause: An invalid ALTER option was specified.
Action: Correct the syntax.
Cause: The cluster name was either missing or invalid.
Action: Specify a valid cluster name. A valid cluster name must start with a letter, be less than or equal to 30 characters, and contain only alphanumeric characters or the special characters $, _, and #. It may not be a reserved word. The name must be specified immediately following the keywords CREATE CLUSTER.
Cause: The table or view entered does not exist, a synonym that is not allowed here was used, or a view was referenced where a table is required. Existing user tables and views can be listed by querying the data dictionary. Certain privileges may be required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it.
Action: Check each of the following:
Contact the database administrator if the table needs to be created or if user or application privileges are required to access the table.
Also, if attempting to access a table or view in another schema, make certain the correct schema is referenced and that access to the object is granted.
Cause: The current user owns no cluster by the specified name.
Action: Specify a valid cluster name following the keyword CLUSTER, then retry the statement.
Cause: An attempt was made to create a table with fewer cluster columns than were specified in the CREATE CLUSTER statement. The CLUSTER clause of a CREATE TABLE statement must specify all cluster columns that were defined when the cluster was created.
Action: Specify all cluster columns in the CREATE TABLE statement, then retry it.
Cause: A column specified in the cluster clause of a CREATE TABLE statement is not a column in this table.
Action: Re-execute the statement, using the names of columns defined for the table.
Cause: A GRANT statement was specified without the keyword TO, or an invalid form of the GRANT command was entered.
Action: Check the syntax for the GRANT command, insert the keyword TO where required, and retry the statement.
Cause: This error occurs when a SQL statement requires two sets of values equal in number, but the second set contains fewer items than the first set. This can occur in a WHERE or HAVING clause in which a nested SELECT returns too few columns as in:
WHERE (A,B) IN (SELECT C FROM ...)Another common cause of this error is an INSERT statement in which the VALUES or SELECT clause does not contain enough values needed for the INSERT, as in
INSERT INTO EMP(EMPNO,ENAME) VALUES('JONES')
Action: Check the number of items in each set and change the SQL statement to make them equal.
Cause: The ALTER CLUSTER statement has been withdrawn.
Action: To add data to a cluster from an existing table, use the following series of SQL statements:
CREATE TABLE newtable SELECT * FROM oldtable CLUSTER clustername;
DROP oldtable;
RENAME TABLE newtable oldtable;
Cause: This is an internal error message not usually issued.
Action: Contact customer support.
Cause: A DROP command was not followed by a valid DROP option, such as CLUSTER, DATABASE LINK, INDEX, ROLLBACK SEGMENT, SEQUENCE, SYNONYM, TABLE, TABLESPACE, or VIEW.
Action: Check the command syntax, specify a valid DROP option, then retry the statement.
Cause: A DROP CLUSTER statement specified a cluster that is not empty. A cluster may not be dropped if it contains any tables, unless the optional INCLUDING TABLES clause is specified. Tables may also be removed from a cluster by using the DROP TABLE command.
Action: Either specify the INCLUDING TABLES clause in the DROP CLUSTER statement or remove all tables from the cluster with the DROP TABLE command before issuing the DROP CLUSTER command.
Cause: Groups are not currently implemented.
Action: No user action required.
Cause: In a CREATE INDEX, DROP INDEX, or VALIDATE INDEX statement, the index name was missing or invalid.
Action: Specify a valid index name after the keyword INDEX. To drop or validate an existing index, check the name by querying the data dictionary. To create a new index, check the syntax before retrying.
Cause: A GRANT CONNECT statement was issued without the keyword IDENTIFIED.
Action: Check the syntax and insert the keyword IDENTIFIED after the last username. The format is
GRANT CONNECT TO user-list IDENTIFIED BY password-list;
Cause: An attempt was made to create a database object (such as a table, view, cluster, index, or synonym) that already exists. A user's database objects must have distinct names.
Action: Enter a unique name for the database object or modify or drop the existing object so it can be reused.
Cause: An AUDIT or NOAUDIT command was not followed by a valid option or the keyword ALL. For example, when AUDITing tables an option such as ALTER, AUDIT, COMMENT, DELETE, GRANT, INDEX, INSERT, LOCK, RENAME, SELECT, or UPDATE must be specified.
Action: Correct the syntax.
Cause: A column name was specified twice in a CREATE or INSERT statement. Column names must be unique within a table, view, or cluster.
Action: In a CREATE statement, change one of the column names to a new, unique column name. In an INSERT statement, remove one of the duplicate names.
Cause: The keyword CHECK should follow the keyword WITH in the WITH OPTION clause of the CREATE VIEW statement.
Action: Check the statement syntax and insert the keyword CHECK where required. Then retry the statement.
Cause: A statement specified the name of a tablespace that does not exist.
Action: Enter the name of an existing tablespace. For a list of tablespace names, query the data dictionary. If a tablespace is dropped and re-created with the same name, use ALTER USER to reset the default or temporary tablespace name, because the new tablespace is not the same as the dropped tablespace, even though they have the same name.
Cause: A column name in the order-by list matches more than one select list column.
Action: Remove the duplicate column naming in the select list.
Cause: The group-by or order-by column list contains more than 255 expressions.
Action: Use no more than 255 expressions in the group-by or order-by list.
Cause: A table specified in a query's SELECT list is not named in the FROM clause list.
Action: Check spelling of the table names, check that each table name in the SELECT list matches a table name in the FROM list, and then retry the statement.
Cause: An alias was used with the return-all-columns function (*) in the SELECT list. For example:
SELECT * COL_ALIAS FROM EMP;
Action: Either specify individual columns or do not specify an alias with a "*".
Cause: A LOCK statement was specified and the keyword TABLE was missing, misspelled, or misplaced. A LOCK statement must begin with LOCK TABLE tablename.
Action: Correct the syntax.
Cause: The keyword WHERE in a SELECT statement was missing, misspelled, or misplaced.
Action: Correct the syntax.
Cause: The keyword INDEX in a CREATE UNIQUE INDEX or VALIDATE INDEX statement was missing, misspelled, or misplaced.
Action: Correct the syntax.
Cause: The keyword ON in a GRANT, REVOKE, or CREATE INDEX statement was missing, misspelled, or misplaced.
Action: Check syntax and spelling, and use the keyword ON where required.
Cause: The keyword START was specified without the keyword WITH. Both keywords are necessary if a START WITH clause is desired in a tree-structured query.
Action: Change the keyword START to the keywords START WITH. Then retry the statement.
Cause: The keyword SET in an UPDATE statement is missing, misspelled, or misplaced.
Action: Check syntax and spelling, and use the keyword SET after the name of the table to be updated.
Cause: The name of a schema object exceeds 30 characters. Schema objects are tables, clusters, views, indexes, synonyms, tablespaces, and usernames.
Action: Shorten the name to 30 characters or less.
Cause: The percentage of free space specified in a CREATE INDEX statement is not between 0 and 100. A PCTFREE value of 0 means the entire block is available. The value 100 is not useful because it means that no data may be inserted. The default is 10.
Action: Specify a PCTFREE value between 0 and 100. Then retry the statement.
Cause: An attempt was made to add two date fields together. Dates may be added only to numeric fields, not to other dates.
Action: Use the Oracle function TO_NUMBER to convert one of the date fields to a numeric field before adding it to the other date field.
Cause: The use of the PRIOR clause, the pseudo-column LEVEL, or ROWNUM is incorrect in this context.
Action: Check the syntax for the SQL statement. Then remove or relocate the keyword PRIOR, LEVEL, or ROWNUM.
Cause: An AUDIT or NOAUDIT statement specified the same option more than once.
Action: Either specify ALL without other auditing options or remove the duplicate auditing specifications.
Cause: A group function, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, was used within another group function, as in MAX(COUNT(*)), without a corresponding GROUP BY clause.
Action: Either add a GROUP BY clause or remove the extra level of nesting.
Cause: The GROUP BY clause does not contain all the expressions in the SELECT clause. SELECT expressions that are not included in a group function, such as AVG, COUNT, MAX, MIN, SUM, STDDEV, or VARIANCE, must be listed in the GROUP BY clause.
Action: Include in the GROUP BY clause all SELECT expressions that are not group function arguments.
Cause: The synonym used is based on a table, view, or synonym that no longer exists.
Action: Replace the synonym with the name of the object it references or re-create the synonym so that it refers to a valid table, view, or synonym.
Cause: Both table-wide and system-wide options were specified within a single AUDIT statement.
Action: Check the AUDIT command syntax. Then retry one or more AUDIT statements.
Cause: A left parenthesis appeared in a join condition, but a plus sign (+) did not follow. A left parenthesis in a join condition usually signals an outer-join specification and so a plus sign is expected to follow. To specify an outer join on a column in a join operation, follow the column reference in the join condition with a plus sign (+) enclosed in parentheses.
Action: Correct the SQL syntax and retry the statement.
Cause: A column name was used in an expression where it is not permitted, such as in the VALUES clause of an INSERT statement.
Action: Check the syntax of the statement and use column names only where appropriate.
Cause: Probably a syntax error.
Action: Correct syntax.
Cause: Probably a syntax error.
Action: Correct syntax.
Cause: No username was specified in a GRANT statement or one of the specified usernames is invalid. Valid usernames must be specified following the keyword TO in a GRANT statement to define a user. A username must begin with a letter, consist only of alphanumeric characters and the special characters $, _, and #, and be less than or equal to 30 characters. If it contains other characters, it must be enclosed in double quotation marks. It may not be a reserved word.
Action: Specify a valid username, or list of usernames, following the keyword TO in the GRANT statement.
Cause: More usernames than passwords were specified in a GRANT statement. A valid password must be specified for each username listed in the GRANT statement.
Action: Enter a valid password for each username.
Cause: More passwords than usernames were specified in a GRANT statement. Only one password may be entered for each username listed in the GRANT statement.
Action: Enter an equal number of usernames and passwords.
Cause: No privileges were specified in a GRANT privilege statement, or one of the specified privileges is invalid.
Action: Enter one or more valid privileges such as SELECT, INSERT, DELETE, UPDATE, ALTER, INDEX, REFERENCES, or ALL. More than one privilege may be granted by entering the privileges in a list separated by commas (,) or by specifying the keyword ALL to grant all privileges.
Cause: An invalid form of the REVOKE command was entered. There are two forms of the REVOKE command. The first form is used to revoke a user's database access privileges. The second form is used to revoke a user's object privileges.
Action: Check the command syntax and retry the statement.
Cause: The keyword WITH was specified at the end of a GRANT statement without the keyword GRANT. To grant privileges to a user and the permission to grant those privileges to another user, you must specify the keywords WITH GRANT OPTION at the end of the GRANT statement.
Action: Change the keyword WITH to the keywords WITH GRANT OPTION, then retry the statement.
Cause: The keywords WITH GRANT were specified at the end of a GRANT statement without the keyword OPTION.
Action: Change the keywords WITH GRANT to the keywords WITH GRANT OPTION. Then retry the statement.
Cause: In a CREATE or DROP SYNONYM statement, the synonym name was either missing or invalid.
Action: Check syntax and spelling. A valid synonym name must be specified immediately following the keyword SYNONYM in both statements. Valid synonym names must begin with a letter, consist of alphanumeric characters and the special characters $, _, and #, and be less than or equal to 30 characters. They may not be reserved words.
Cause: A single bar (|) was interpreted as an attempt to specify concatenation, but the concatenation operator is a double bar (||).
Action: Enter a double bar (||) for concatenation or remove the single bar (|) if concatenation was not intended.
Cause: A value of datatype LONG was used in a function or in a DISTINCT, WHERE, CONNECT BY, GROUP BY, or ORDER BY clause. A LONG value can only be used in a SELECT clause.
Action: Remove the LONG value from the function or clause.
Cause: An expression or function was used in a CREATE VIEW statement, but no corresponding column name was specified. When expressions or functions are used in a view, all column names for the view must be explicitly specified in the CREATE VIEW statement.
Action: Enter a column name for each column in the view in parentheses after the view name.
Cause: In a CREATE VIEW statement, the view name was missing or invalid.
Action: Enter a valid view name following CREATE VIEW. Valid view names must begin with a letter, consist of only alphanumeric characters and the special characters $, _, and #, be less than or equal to 30 characters, and may not be reserved words. If the view name contains other characters, it must be enclosed in double quotation marks.