PLS-00109: unknown exception name '%.*s' in PRAGMA EXCEPTION_INIT
Error code in OceanBase Database: 9583
SQLSTATE: HY000
Cause: The declaration of the exception name referenced in the
EXCEPTION_INITpragma is not found in the scope of pragmas.Solution: Ensure that the
pragmascomply with the exception declaration and are within the same scope.
PLS-00114: identifier ' %.*s' too long
Error code in OceanBase Database: 9526
SQLSTATE: HY000
Cause: The name of the PL variable exceeds 128 characters. The maximum length of a valid identifier (including the quotation marks) is 128 characters. A string may be incorrectly enclosed by double quotation marks instead of single quotation marks, and PL considers it an identifier with quotation marks.
Solution: Shorten the identifier.
PLS-00119: Duplicate having-clause in table expression
Error code in OceanBase Database: 9501
SQLSTATE: HY000
Cause: The
SELECTstatement contains two or moreHAVINGclauses.Solution: Delete one
HAVINGclause, and useANDorORto connect logical expressions when necessary.
PLS-00124: name of exception expected for first arg in exception_init pragma
Error code in OceanBase Database: 9674
SQLSTATE: HY000
Cause: The first parameter passed to the EXCEPTION_INIT pragma is not an exception name. The first parameter must be an exception name that is legally declared.
Solution: Replace the first argument with the name of a legally declared exception.
PLS-00128: Illegal number of arguments for pragma EXCEPTION_INIT
Error code in OceanBase Database: 9675
SQLSTATE: HY000
Cause: The number of parameters passed to the named pragma compiler directive is incorrect. A required parameter was omitted from the parameter list, or the pragma syntax has errors. For example, parameters are not separated by commas (,).
Solution: Specify the missing argument or correct the faulty syntax.
PLS-00154: An object type may have only 1 MAP or 1 ORDER method
Error code in OceanBase Database: 9523
SQLSTATE: HY000
Cause: Multiple
MAPorORDERfunctions were declared. One object type can have only oneMAPorORDERfunction.
PLS-00155: Only a function may be a MAP, ORDER or CONSTRUCTOR method
Error code in OceanBase Database: 9525
SQLSTATE: HY000
Cause: A procedure is declared as the
MAP,ORDER, orCONSTRUCTORmethod. Only functions can be declared as theMAP,ORDER, orCONSTRUCTORmethod.
PLS-00157: Only schema-level programs allow %s
Error code in OceanBase Database: 9506
SQLSTATE: HY000
Cause: The
AUTHIDorDEFAULT COLLATIONclause is specified for a program package or type. Only mode-level stored procedures, program packages, and types support these clauses.Solution: Delete the clause.
PLS-00179: $ERROR: %.*s
Error code in OceanBase Database: 9540
SQLSTATE: HY000
Cause: The
$ERRORdirective is used.
PLS-00201: identifier '%.*s' must be declared
Error codes in OceanBase Database: 5543 and 5546
SQLSTATE: 42000
Cause:
An undeclared variable, exception, or procedure was referenced.
An item to which no privilege was granted was referenced.
An item to which privileges were granted only through a role was referenced.
A stored object, such as a program package, procedure, function, trigger, or view, runs in the security zone of the object owner, and no other roles except
PUBLICare enabled.
Solution:
Check the spelling and declaration of the referenced item name.
Check whether the declaration of the referenced item is correctly placed in the block structure.
If you are sure that the referenced item is declared and you are authorized to reference this item, check your privileges.
PLS-00204: function or pseudo-column '%s' may be used inside a SQL statement only
Error code in OceanBase Database: 9682
SQLSTATE: HY000
Cause: A pseudo column or a proscribed function is used in the procedural statement. SQL pseudo columns such as LEVEL, ROWID, and ROWNUM can be used only in SQL statements. Similarly, some functions (such as DECODE, DUMP, and VSIZE) and SQL group functions (AVERAGE, MIN, MAX, COUNT, SUM, STDEV, and VARIANCE) can be used only in SQL statements.
Solution: Delete the pseudo column reference or function call statement from the procedural statement, or replace the procedural statement with the SELECT INTO statement. For example, replace
bonus := DECODE(rating, 1, 5000, 2, 2500, ...);withSELECT DECODE(rating, 1, 5000, 2, 2500, ...) INTO bonus FROM dual;.
PLS-00206: %%TYPE must be applied to a variable, column, field or attribute, not to '%.*s'
Error code in OceanBase Database: 9547
SQLSTATE: HY000
Cause: The program object declared by using the
%TYPEdata type attribute is not of the appropriate class. It must must an object that supports value assignment, such as a variable, column, record group, or subprogram parameter.Solution: Add an initialization clause to the variable declaration. If the syntax of the initialization clause is complex, you can add a function call in place of the syntax.
PLS-00218: a variable declared NOT NULL must have an initialization assignment
Error code in OceanBase Database: 9514
SQLSTATE: HY000
Cause: In a declaration, a variable without an initialization clause is automatically initialized into
NULL, which is illogical for aNOT NULLvariable. Therefore, an initialization clause is needed.Solution: Add an initialization clause to the variable declaration. If the syntax of the initialization clause is complex, you can add a function call in place of the syntax.
PLS-00254: OUT and IN/OUT modes cannot be used in this context
Error code in OceanBase Database: 9502
SQLSTATE: HY000
Cause: The actual parameter mode (
OUTorIN/OUT) is not properly used in theUSINGclause. For theUSINGclause in theOPENstatement, only theINmode is allowed.Solution: Change the parameter mode in the
USINGclause to the correct mode.
PLS-00304: cannot compile body of '%.*s' without its specification
Error code in OceanBase Database: 9520
SQLSTATE: HY000
Cause: The program package specification required for compiling the body of the program package cannot be found. The possible causes are as follows:
The name of the software package is misspelled.
The software package specification is never compiled.
The compiled software package specification cannot be accessed. The software package specification must be compiled before the body of the software package is compiled, and the compiler must have the privilege to access the compiled specification.
Solution:
Check the spelling of the software package name.
Compile the program package specification before you compile the body of the program package.
Ensure that the compiler can access the compiled specification.
PLS-00305: previous use of '%.*s' conflicts with this use
Error code in OceanBase Database: 9529
SQLSTATE: HY000
Cause: When the compiler searches for the predeclaration of a cursor, procedure, function, or program package, it finds another object with the same name in the same action scope, or the name in the header of the subprogram does not match the name in the body.
Solution:
Check the spelling of the cursor, procedure, function, or program package name.
Check the names of all constants, variables, parameters, and exceptions declared in the same action scope.
Delete or rename objects with duplicate names.
Modify the name in the header of the subprogram so that it matches the name in the body of the program.
PLS-00306: wrong number or types of arguments in call to '%.*s'
Error code in OceanBase Database: 9542
SQLSTATE: HY000
Cause: A subprogram call does not match any declaration of the subprogram name. The possible causes are as follows:
The subprogram name is misspelled.
The data type of a parameter is incorrect.
The declaration is incorrect or is incorrectly placed in a block structure. For example, the built-in square root function
SQRTis called by using a misspelled name or a parameter with an incorrect data type.
Solution:
Check the spelling and declaration of the subprogram name.
Ensure that the subprogram call is correct.
Ensure that the parameters are of correct data types.
Ensure that the declaration is correctly placed in a block structure if the function is not a built-in function.
PLS-00307: too many declarations of '%.*s' match this call
Error code in OceanBase Database: 9544
SQLSTATE: HY000
Cause: The declaration of a subprogram or cursor name is ambiguous. This is because the declaration and call do not exactly match and multiple declarations match the call during the implicit conversion of parameter data types. The possible causes are as follows:
The subprogram or cursor name is misspelled.
The declaration is incorrect.
The declaration is not correctly placed in a block structure.
Solution:
Check the spelling and declaration of the subprogram or cursor name.
Ensure that the call is correct.
Ensure that the parameters are of correct data types.
Place the declaration properly in a block structure if the function is not a built-in function.
PLS-00318: type '%.*s' is malformed because it is a non-REF mutually recursive type
Error code in OceanBase Database: 9539
SQLSTATE: HY000
Cause: The type declaration is in incorrect format because the declaration contains a mutually recursive non-reference relationship. The possible causes are as follows:
A recursive self-reference is included.
A mutually recursive reference is included.
Solution: Use another type in the declaration to avoid recursion.
PLS-00320: the declaration of the type of this expression is incomplete or malformed
Error code in OceanBase Database: 9597
SQLSTATE: HY000
Cause: A variable or cursor name in the declaration is misspelled, or the declaration contains a forward reference. Forward references are not allowed in PL/SQL. A variable or cursor must be declared before it is referenced in other statements, including other declarative statements. For example, a declaration of
dept_reccauses this exception because it references an undeclared cursordept_cur. Examples:DECLARE dept_rec dept_cur%ROWTYPE; CURSOR dept_cur IS SELECT ...Solution: Check the spelling of all identifiers in the declaration. Change the position of the declaration to eliminate forward references if necessary.
PLS-00321: expression '%.*s' is inappropriate as the left hand side of an assignment statement
Error code in OceanBase Database: 9513
SQLSTATE: HY000
Cause: This expression appears on the left side of an assignment statement, which is not allowed. For example,
SYSDATE: = '01 -JAN-1990';is not allowed because the functionSYSDATEcannot appear on the left side of the assignment statement.Solution: Modify the assignment statement.
PLS-00322: Constant declarations should contain initialization assignments
Error code in OceanBase Database: 9515
SQLSTATE: HY000
Cause: The constant declaration does not contain an initial value.
Solution: Modify the constant declaration.
PLS-00323: subprogram or cursor '%.*s' is declared in a package specification and must be defined in the package body
Error code in OceanBase Database: 9585
SQLSTATE: HY000
Cause: A cursor or subprogram declared in the package header is not defined in the package body.
Solution: Check the spelling of the subprogram name. Add the missing subprogram body to the package body if necessary.
PLS-00325: non-integral numeric literal %.*s is inappropriate in this context
Error code in OceanBase Database: 9670
SQLSTATE: HY000
Cause: A non-integral numeric literal is used in a context that requires an integer.
Solution: Replace the inappropriate literal with an integral literal.
PLS-00363: expression '%.*s' cannot be used as an assignment
Error code in OceanBase Database: 9550
SQLSTATE: HY000
Cause: A literal, constant,
INparameter,countervariable in LOOP, or function call is incorrectly used in the statement.Solution: Modify the statement expression.
PLS-00366: subtype of a not null type must also be not null
Error code in OceanBase Database: 9684
SQLSTATE: HY000
Cause: A subtype defined as
NOT NULLis used as the base type for another subtype defined asNULL. Example:DECLARE SUBTYPE Weekday IS INTEGER NOT NULL; SUBTYPE Weekend IS Weekday;.Solution: Modify the subtype definition.
PLS-00367: a RAISE statement with no exception name must be inside an exception handler
Error code in OceanBase Database: 9592
SQLSTATE: HY000
Cause: A RAISE statement that is not followed by an exception name was found outside an exception handler.
Solution: Delete the RAISE statement, relocate it to an exception handler, or provide the missing exception name.
PLS-00371: at most one declaration for '%.*s' is permitted
Error code in OceanBase Database: 9507
SQLSTATE: HY000
Cause: The reference of a variable is ambiguous because this variable has multiple declarations. In the declaration part of a block, procedure, or function, only one local variable with a given identifier is allowed. The given variable can appear only in one block.
Solution: Check the spelling of the variable. Retain only one declaration of the variable and delete all other declarations if necessary.
PLS-00372: In a procedure, RETURN statement cannot contain an expression
Error code in OceanBase Database: 5583
SQLSTATE: 42000
Cause: In a procedure, the
RETURNstatement contains an expression, which is not allowed.Solution: Delete the expression from the
RETURNstatement, or redefine the procedure as a function.
PLS-00373: EXIT/CONTINUE label '%.*s' must label a LOOP statement
Error code in OceanBase Database: 9512
SQLSTATE: HY000
Cause: The label in the
EXITorCONTINUEstatement does not reference theLOOPstatement. No label needs to be specified for theEXITorCONTINUEstatement. If a label (such as a label inEXIT my_labelorCONTINUE my_label) is specified, the label must reference theLOOPstatement.Solution: Ensure that the label name is correctly spelled and the label references the
LOOPstatement.
PLS-00375: illegal GOTO statement; this GOTO cannot branch to label '%.*s'
Error code in OceanBase Database: 9505
SQLSTATE: HY000
Cause: The branch of the
GOTOstatement is a label from the outside of a construct (such as a loop or an exception handling program) that contains a statement sequence to the inside of the statement sequence. Such a branch is not allowed.Solution: Move the
GOTOstatement to the inside of the statement sequence, or move the labeled statement outside of the statement sequence.
PLS-00376: illegal EXIT/CONTINUE statement; it must appear inside a loop
Error code in OceanBase Database: 9510
SQLSTATE: HY000
Cause: The
EXITorCONTINUEstatement is found outside of a loop construct. TheEXITstatement exits from the loop prematurely, and theCONTINUEstatement is used to start the next iteration of the loop. The two statements must always appear in a loop.Solution: Delete the
EXITorCONTINUEstatement, or put them in a loop construct.
PLS-00382: expression is of wrong type
Error code in OceanBase Database: 9519
SQLSTATE: HY000
Cause: The expression has a wrong data type.
Solution: Change the data type of the expression. You may need to use the data type conversion feature.
PLS-00403: expression '%.*s' cannot be used as an INTO-target of a SELECT/FETCH statement
Error code in OceanBase Database: 9665
SQLSTATE: HY000
Cause: The
FETCHstatement cannot assign a value to an assignment target in itsINTOlist because the target is not a variable that is legally formed and declared. For example, theFETCH my_cur INTO 'Jones'assignment statement is invalid because'Jones'is a string rather than a variable.Solution: Check the spelling and declaration of the assignment target. Ensure that the variable naming rules are followed.
PLS-00404: cursor '%.*s' must be declared with FOR UPDATE to use with CURRENT OF
Error code in OceanBase Database: 9693
SQLSTATE: HY000
Cause: Only when the
FOR UPDATEclause is used to declare the legality of thecursor_name, the use of theCURRENT OF cursor_nameclause is valid.Solution: Add a
FOR UPDATEclause to the cursor definition, or do not use theCURRENT OF cursor_nameclause.
PLS-00410: duplicate fields in RECORD,TABLE or argument list are not permitted
Error code in OceanBase Database: 9508
SQLSTATE: HY000
Cause: When a user-defined record is declared, two fields with the same name are found. Like the column names in database tables, the user-defined field names must also be unique.
Solution: Check the spelling of the field names and delete duplicate ones.
PLS-00413: identifier in CURRENT OF clause is not a cursor name
Error code in OceanBase Database: 9692
SQLSTATE: HY000
Cause: The identifier in the
CURRENT OFclause names an object instead of a cursor.Solution: Check the spelling of the identifier. Ensure that the identifier names the cursor in the
DELETEorUPDATEstatement, and that the identifier names the cursor itself instead of theFORloop variable.
PLS-00438: value in LIMIT clause \'%.*s\' use is invalid
Error code in OceanBase Database: 9518
SQLSTATE: HY000
Cause: The numeric value type of the
LIMITclause behindFETCH INTOis incorrect. For example, the following statement is invalid because theLIMITclause requires a numeric value:FETCH c1 BULK COLLECT INTO var_tab LIMIT 'aaaaa';Solution: Modify the expression of the
LIMITclause so that it is followed by a numeric value. Example:FETCH c1 BULK COLLECT INTO var_tab LIMIT '22333';.
PLS-00485: in exception handler, '%.*s' must be an exception name
Error code in OceanBase Database: 5545
SQLSTATE: 42000
Cause: An identifier not declared as an exception appeared in the
WHENclause of an exception handler. Only an exception name is valid in aWHENclause.Solution: Check the spelling of the exception name to ensure that the exception is correctly declared.
PLS-00488: '%.*s' must be a type
Error code in OceanBase Database: 9543
SQLSTATE: HY000
Cause: The data type descriptor in the declaration or expression does not designate a valid type. The possible causes are as follows:
The
%TYPEattribute is not added to the declaration. For example, inDECLARE my_sal emp.sal%TYPE;my_ename emp.ename;, the%TYPEattribute is not declared.To automatically provide the data type of a column when a constant or a variable is declared, the
%TYPEattribute can be used.To automatically provide the data type of a row when a record is declared, the
%ROWTYPEattribute can be used.
Solution: Ensure that the data type descriptor designates a valid type. Use the
%TYPEand%ROWTYPEattributes if necessary.
PLS-00520: MAP methods must be declared without any parameters other than (optional) SELF
Error code in OceanBase Database: 9532
SQLSTATE: HY000
Cause: Parameters are declared for the
MAPmember function. TheMAPmember function can have only one parameter, which is the defaultSELFparameter. TheMAPfunction cannot be declared as any parameter, and theSELFparameter is added by the compiler.Solution: Delete the parameters from the
MAPfunction.
PLS-00521: ORDER methods must be declared with 1 (one) parameter in addition to (optional) SELF
Error code in OceanBase Database: 9538
SQLSTATE: HY000
Cause: The
ORDERfunction is declared without user-defined parameters. TheORDERfunction has two parameters, one of which is the defaultSELFparameter added by the compiler. The other parameter is added by the user and must be of the same type as the contained object.Solution: Change the parameter type.
PLS-00522: MAP methods must return a scalar type
Error code in OceanBase Database: 9531
SQLSTATE: HY000
Cause: The
MAPmember function is compiled in a way that it returns a value not of the scalar type.Solution: Recompile the
MAPfunction so that it returns a value of the scalar type.
PLS-00523: ORDER methods must return an INTEGER
Error code in OceanBase Database: 9533
SQLSTATE: HY000
Cause: The
ORDERfunction returns a value not of the integer type.Solution: Recompile the
ORDERfunction so that it returns a value of the integer type.
PLS-00524: The parameter type in an ORDER method must be the containing object type
Error code in OceanBase Database: 9534
SQLSTATE: HY000
Cause: The
ORDERfunction is declared without user-defined parameters. TheORDERfunction has two parameters, one of which is the defaultSELFparameter added by the compiler. The other parameter is added by the user and must be of the same type as the contained object.Solution: Change the parameter type.
PLS-00525: Within SQL statements, only equality comparisons of objects are allowed without a map or order function
Error code in OceanBase Database: 9535
SQLSTATE: HY000
Cause: The
MAPorORDERfunction is not provided for comparison. In this case, only equality comparison can be used.Solution: Provide the
MAPorORDERfunction, or enable the program to use only equality comparison.
PLS-00526: A MAP or ORDER function is required for comparing objects in PL/SQL Execution
Error code in OceanBase Database: 9524
SQLSTATE: HY000
Cause: In the PL code, the
MAPorORDERfunction is not defined for object comparison.Solution: Define the
MAPorORDERfunction and retry.
PLS-00527: MAP or ORDER functions require a PRAGMA RESTRICT_REFERENCES specifying :WNDS,WNPS,RNPS,RNDS
Error code in OceanBase Database: 9536
SQLSTATE: HY000
Cause:
pragma restrict_referencesis not specified.pragma restrict_referencesis specified but lacks any of the following parameters:WNDS,WNPS,RNPS, orRNDS.
Solution: Add or correct
pragma, and then retry.
PLS-00528: The parameters to an ORDER function must have IN mode
Error code in OceanBase Database: 9537
SQLSTATE: HY000
Cause: The parameter of the
ORDERfunction is declared to be in theOUTorIN OUTmode.Solution: Declare the parameter to be in the
INmode.
PLS-00537: A VARRAY must have a positive limit
Error code in OceanBase Database: 9611
SQLSTATE: HY000
Cause: The length declared for the VARRAY type cannot be a non-positive number, for example, VARRAY(0).
Solution: Change the length in the VARRAY type declaration to a positive number and try again.
PLS-00538: subprogram or cursor '%.*s' is declared in an object type specification and must be defined in the object type body
Error code in OceanBase Database: 9522
SQLSTATE: HY000
Cause: The specified subprogram is declared in the specification of the object type but is not defined in the body of the object type.
Solution: Define the subprogram in the body of the object type, or delete the declaration from the specification.
PLS-00539: subprogram '%.*s' is declared in an object type body and must be defined in the object type specification
Error code in OceanBase Database: 9521
SQLSTATE: HY000
Cause: The specified subprogram is declared in the body of the object type but is not defined in the specification of the object type. You can choose not to define the cursor body.
Solution: Define the subprogram in the specification of the object type, or delete the declaration from the body.
PLS-00587: a static method cannot be invoked on an instance value
Error code in OceanBase Database: 9527
SQLSTATE: HY000
Cause: You attempted to use an object instance value rather than a type name as the qualifier of the method call name. However, only a type name can be used as the qualifier when a static method is called.
Solution: Use a type name rather than an object instance value as the qualifier of a static method.
PLS-00594: the SELF parameter can be declared only as IN or as IN OUT
Error code in OceanBase Database: 9530
SQLSTATE: HY000
Cause: The
SELFparameter is declared as anOUTparameter.Solution: Declare the
SELFparameter as anINorIN OUTparameter.
PLS-00597: expression '%.*s' in the INTO list is of wrong type
Error code in OceanBase Database: 9637
SQLSTATE: HY000
Cause:
- The expression in the INTO clause of the OPEN or RETURNING statement is neither a valid SQL data type nor a PL/SQL RECORD data type.
- A record set is used in the INTO clause of the OPEN or RETURNING statement.
- A record or a record set is used in the BULK COLLECT INTO statement.
Solution: Use an expression with the correct data type in the INTO clause.
PLS-00642: local collection types not allowed in SQL statements
Error code in OceanBase Database: 9589
SQLSTATE: HY000
Cause: A locally defined set data type, instead of a non-mode-level set data type, is used in the SQL statement. This type must be defined in the schema accepted by the SQL statement.
Solution: Define the collection type in your schema instead of in a PL/SQL subprogram.
PLS-00658: constructor method name must match type name
Error code in OceanBase Database: 9528
SQLSTATE: HY000
Cause: You attempted to use an object instance value rather than a type name as the qualifier of the method call name. However, only a type name can be used as the qualifier when a static method is called.
Solution: Use a type name rather than an object instance value as the qualifier of a static method.
PLS-00661: RETURN statement in a CONSTRUCTOR cannot include an expression
Error code in OceanBase Database: 9541
SQLSTATE: HY000
Cause: An expression exists in the
RETURNstatement of theCONSTRUCTORbody.Solution: Delete the expression from the
RETURNstatement.
PLS-00701: illegal ORACLE error number %.*s for PRAGMA EXCEPTION_INIT
Error code in OceanBase Database: 9629
SQLSTATE: HY000
Cause: The error code passed to the
EXCEPTION_INITpragma is out of range. An error code must be in the range of00001to09999(excluding00100), or in the range of20000to20999for user-defined errors.Solution: Use a valid error code.
PLS-00702: second argument to PRAGMA EXCEPTION_INIT must be a numeric literal
Error code in OceanBase Database: 9676
SQLSTATE: HY000
Cause: The second parameter passed to the EXCEPTION_INIT pragma is not a numeric literal. For example, you passed a variable. The second parameter must be in the range of
1to9999(excluding100), or in the range of20000for20999for user-defined errors.Solution: Replace the second parameter with a valid error code.
PLS-00710: Pragma AUTONOMOUS_TRANSACTION cannot be specified here
Error code in OceanBase Database: 9509
SQLSTATE: HY000
Cause: The
AUTONOMOUS_TRANSACTIONpragma cannot be specified here.Solution: Check whether the pragma name is correctly spelled.
PLS-00905: object '%.*s' is invalid
Error code in OceanBase Database: 9548
SQLSTATE: HY000
Cause: An invalid software package specification or subprogram is referenced. If the software package specification, the source code of the subprogram, or a referenced database object of the subprogram is discarded, replaced, or changed since the last compilation, the software package or subprogram becomes invalid.
Solution: Identify the reason why the software package specification or subprogram becomes invalid, and ensure that the software package specification or subprogram can be correctly recompiled.
PLS-00994: Cursor Variables cannot be declared as part of a package
Error code in OceanBase Database: 9516
SQLSTATE: HY000
Cause: You attempted to declare a cursor variable in the program package specification, which is not allowed. You can define the
REF CURSORtype in PL blocks, subprograms, and program packages, but cursor variables can be declared only in blocks or subprograms.Solution: Move the declaration of the cursor variable to a PL block or a subprogram.