Category Archives: PLS Database Error Messages

PLS-00128: Illegal number of arguments for pragma string

oracle

PLS-00128: Illegal number of arguments for pragma string
Cause: The number of arguments (actual parameters) passed to the named pragma (compiler directive) is incorrect. A required argument was omitted from the argument list, or the pragma syntax is faulty (for example, a comma might be missing between two parameters).
Action: Supply the missing argument, or correct the faulty syntax.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00127: Pragma string is not a supported pragma

oracle

PLS-00127: Pragma string is not a supported pragma
Cause: The named pragma (compiler directive) is not among those supported by PL/SQL. The pragma name might be misspelled, or the pragma syntax might be faulty.
Action: Check the spelling of the pragma name, and make sure the proper syntax was used.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00126: selector ALL is not allowed

oracle

PLS-00126: selector ALL is not allowed
Cause: The ALL shortcut for specifying system privileges or statement options was used in a SQL statement. PL/SQL does not support the ALL shortcut.
Action: Remove the ALL shortcut from the SQL statement.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00125: type name expected

oracle

PLS-00125: type name expected
Cause: When a constant or variable was declared, its datatype was not specified. For example, the code might look like: 

pi CONSTANT := 3.14159; -- should be CONSTANT REAL := 3.14159 

Every constant and variable must have a datatype, which specifies a storage format, constraints, and valid range of values.
Action: Supply the type name.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00124: name of exception expected for first arg in exception_init pragma

oracle

PLS-00124: name of exception expected for first arg in exception_init pragma
Cause: The first argument passed to the EXCEPTION_INIT pragma was something other than an exception name. The first argument must be the name of a legally declared exception.
Action: Replace the first argument with the name of a legally declared exception.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00123: program too large

oracle

PLS-00123: program too large
Cause: PL/SQL was designed primarily for robust transaction processing. One consequence of the special-purpose design is that the PL/SQL compiler imposes a limit on block size. The limit depends on the mix of statements in the PL/SQL block. Blocks that exceed the limit cause this error.
Action: The best solution is to modularize the program by defining subprograms, which can be stored in an Oracle database. Another solution is to break the program into two sub-blocks. Have the first block INSERT any data the second block needs into a temporary database table. Then, have the second block SELECT the data from the table.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00122: string as separator is allowed only with specific built-in functions

oracle

PLS-00122: string as separator is allowed only with specific built-in functions
Cause: A few built-in functions use keywords (instead of commas) as argument separators. A function different from one of these built-in functions is using a keyword as an argument separator.
Action: Correct the argument list or change the function name.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00121: only the set function COUNT may take * as an argument

oracle

PLS-00121: only the set function COUNT may take * as an argument
Cause: The asterisk (*) option was used in the argument list of a SQL group function other than COUNT. For example, the code might look like: 

SELECT SUM(*) INTO emp_count FROM emp; -- should be COUNT(*) 

Only COUNT permits the use of the asterisk option, which returns the number of rows in a table.
Action: Remove the asterisk option from the argument list and replace it with an expression that refers to one or more database columns.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00120: inappropriate argument in OPEN statement

oracle

PLS-00120: inappropriate argument in OPEN statement
Cause: The CURSOR_NAME parameter in an OPEN statement is misspelled or does not refer to a legally declared cursor.
Action: Check the spelling of the CURSOR_NAME parameter. Make sure the cursor was declared properly.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

PLS-00119: Duplicate having-clause in table expression

oracle

PLS-00119: Duplicate having-clause in table expression
Cause: Two or more HAVING clauses were found in a SELECT statement. The HAVING clause specifies a condition under which groups of rows (formed by the GROUP BY clause) are included in the result. The condition can include several logical expressions connected by AND or OR, but a statement can contain only one HAVING clause.
Action: Remove one of the HAVING clauses and, if necessary, connect logical expressions by AND or OR.

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/