Applicability
This topic applies only to the Oracle-compatible mode OceanBase Database.
PLS-00001: PL/SQL common error", "%s
Error code in OceanBase Database: 9656
SQLSTATE: HY000
Cause: An unexpected symbol appears.
Solution: Change the unexpected symbol that appears in the position with the error.
PLS-00103: Encountered the symbol %s when expecting one of the following: %s
Error code in OceanBase Database: 9700
SQLSTATE: HY000
Cause: The parser found a token (language element) that is inappropriate in this context.
Solution: Check the previous tokens as well as the one given in the error message. The line and column numbers given in the error message refer to the end of the faulty language construct.
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: Make sure that the pragmas comply with the exception declaration and are within the same scope.
PLS-00113: END identifier '%.*s' must match '%.*s
Error code in OceanBase Database: 9659
SQLSTATE: HY000
Cause: The keyword
ENDterminates some language constructs, such as loops, blocks, functions, and procedures. Following this keyword, you can optionally place the name of such a construct. For example, at the end of the definition of loopL, you might writeEND L. This error occurs when the optional name does not match the name given to the language construct. It is usually caused by a misspelled identifier or by faulty block structure.Solution: Make sure that the spelling of the END identifier matches the name given to the language construct and that the block structure is correct.
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-00115: this PRAGMA must follow the declaration of '%.*s
Error code in OceanBase Database: 9622
SQLSTATE: HY000
Cause: The
pragmarefers to a PL/SQL object that was not declared or is not within the scope of the reference. Identifiers must be declared before they are used in a pragma. Forward references are not allowed.Solution: Check the spelling and declaration of the identifier. In addition, confirm that the declaration is placed correctly in the block structure.
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 argument passed to the
EXCEPTION_INITpragma was not an exception name.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 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 contains errors. For example, a comma might be missing between two parameters.
Solution: Specify the missing argument or correct the faulty syntax.
PLS-00130: Pragma %s expects 1st argument to be a procedure/function/package/cursor
Error code in OceanBase Database: 9661
SQLSTATE: HY000
Cause: The first argument (actual parameter) passed to the named pragma (compiler directive) was not the name of a subprogram, package, or cursor, as required. The parameter might be misspelled, or the pragma syntax might contain errors. For example, a comma might be missing between two parameters.
Solution: Check the spelling of the first argument, and make sure that the proper syntax is used.
PLS-00132: Pragma %s does not support %.*s
Error code in OceanBase Database: 9658
SQLSTATE: HY000
Cause: One of the parameters passed to this pragma was not among the list of allowed values. The parameter might be misspelled, or the pragma syntax might contain errors. For example, a comma might be missing between two parameters.
Solution: Check the spelling of all parameters, and make sure that the proper syntax is used.
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-00168: string'", "duplicate modifier specification '%s'
Error code in OceanBase Database: 9643
SQLSTATE: HY000
Cause: A method or object type modifier was specified repeatedly.
Solution: Retain only one modifier and remove all other duplicate ones.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00169: modifier '%s' conflicts with prior '%s' specification
Error code in OceanBase Database: 9642
SQLSTATE: HY000
Cause: The method or object type modifier specified conflicts with an earlier modifier. For example, a FINAL modifier cannot be combined with a NOT FINAL modifier.
Solution: Remove one of the conflicting modifiers.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00172: string literal too long
Error code in OceanBase Database: 9644
SQLSTATE: HY000
Cause: The string literal was longer than 32,767 bytes.
Solution: Use a string literal of at most 32,767 bytes.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00179: $ERROR: %.*s
Error code in OceanBase Database: 9540
SQLSTATE: HY000
Cause: The
$ERRORdirective is used.
PLS-00182: Identifier cannot be an empty string
Error code in OceanBase Database: 9657
SQLSTATE: HY000
Cause: The identifier was declared using an empty string.
Solution: Rename the identifier to a non-empty string.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00201: identifier '%.*s' must be declared
Error code 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 INTOstatement. For example, replacebonus := 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. The data type must be variable, column, record group, subprogram parameter, or another object that supports value assignment.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-00221: %s' is not a procedure or is undefined
Error code in OceanBase Database: 9683
SQLSTATE: HY000
Cause: An identifier being referenced as a procedure was not declared or actually represents another object. For example, it might have been declared as a function.
Solution: Check the spelling and declaration of the identifier. In addition, confirm that the declaration is placed correctly in the block structure.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00222: no function with name '%.*s' exists in this scope
Error code in OceanBase Database: 9627
SQLSTATE: HY000
Cause: An identifier being referenced as a function was not declared or actually represents another object. For example, it might have been declared as a procedure.
Solution: Check the spelling and declaration of the identifier. In addition, confirm that the declaration is placed correctly in the block structure.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00225: subprogram or cursor '%.*s' reference is out of scope
Error code in OceanBase Database: 9628
SQLSTATE: HY000
Cause: The prefix in a qualified name was a subprogram or cursor beyond an enclosing scope. In other words, a subprogram or cursor name is being used as a scope qualifier for a reference to an entity (within that subprogram or cursor) that is not in scope. Here is an example:
declare x number; type t1 is record (a number); function f return t1 is a number; begin x := f.a;Legal use of function "f" as a scope qualifier
Resolves to local variable "a" in function
x := f().a;Legal reference to component "a" of the returned record end
Illegal use of function "f" as a scope qualifier
x := f().a;and legal reference to component "a" of the returned record end
Solution:
If you intend to refer to a local variable of a non-enclosing function, this is not allowed. You must remove the reference.
If this is a parameterless function, and you intend to access a field of the function call result, use empty parentheses in the call.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00227: subprogram 'in' formal %.*s is not yet denotable
Error code in OceanBase Database: 9598
SQLSTATE: HY000
Cause: When the formal parameters of a subprogram were declared, one parameter was used to initialize another, for example:
PROCEDURE my_proc (j NUMBER, k NUMBER := j) IS .... The first parameter has no value until runtime. Therefore, it cannot be used to initialize another parameter.Solution: Remove the illegal formal parameter reference.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00230: OUT and IN OUT formal parameters may not have default expressions
Error code in OceanBase Database: 9599
SQLSTATE: HY000
Cause: When the formal parameters of a procedure were declared, an
OUTorIN-OUTparameter was initialized to a default value, for example:PROCEDURE calc_bonus (bonus OUT REAL := 0, ...) IS .... However, only theINparameter can be initialized to the default value.Solution: Remove the illegal default expression.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00231: function '%.*s' may not be used in SQL
Error code in OceanBase Database: 9668
SQLSTATE: HY000
Cause: A prohibited function was used in an SQL statement. Certain functions such as
SQLCODEandSQLERRMcan be used only in procedural statements.Solution: Remove the call to the function from the SQL statement. Alternatively, use a local variable to replace the function call. For example, the following statement is illegal:
INSERT INTO errors VALUES (SQLCODE, SQLERRM);. However, you can assign the values ofSQLCODEandSQLERRMto local variables and then use the variables in the SQL statement, as inerr_num:=SQLCODE; err_msg:=SQLERRM; INSERT INTO errors VALUES (err_num, err_msg);.
Note
This error code is introduced since OceanBase Database V4.0.0.
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-00263: mismatch between string on a subprogram specification and body
Error code in OceanBase Database: 9602
SQLSTATE: HY000
Cause: An
ACCESSIBLE BYclause was specified in a package body for an item with no equivalent clause in the package specification. In a package body, this clause can be specified only on externally visible subprograms, and the subprogram specification and body must have equivalent clauses. You cannot specify this clause on package-local or nested subprograms.Solution: Modify the clause on the subprogram body for compliance with the specification errors until 300 PH2 errors are reserved for external procedures.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00301: Invalid GOTO to non-label '%.*s'
Error code in OceanBase Database: 9667
SQLSTATE: HY000
Cause: A
GOTOstatement was converted into something which is not a label (such as a variable).Solution: Specify a valid label name.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00302: component '%.*s' must be declared
Error code in OceanBase Database: 9681
SQLSTATE: HY000
Cause: A referenced component (for example, in the name "a.B", "B" is a component of "a") has not been declared. The error might be caused by component misspelling, incorrect declaration, or incorrect declaration position in the block structure.
Solution: Check the spelling and declaration of the component. In addition, confirm that the declaration is placed correctly in the block structure.
Note
This error code is introduced since OceanBase Database V4.0.0.
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.
Make sure 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 invalid data type.
Solution:
Check the spelling and declaration of the subprogram name.
Make sure that the subprogram call is correct.
Make sure that the parameters are of correct data types.
Make sure 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.
Make sure that the call is correct.
Make sure 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-00310: with %%ROWTYPE attribute, '%.*s' must name a table, cursor or cursor-variable
Error code in OceanBase Database: 9586
SQLSTATE: HY000
Cause: The
%ROWTYPEattribute must be applied to an identifier declared as a cursor, cursor variable, or database table. This error occurs when%ROWTYPEfollows an identifier that has not been declared.Solution: Change the declaration or do not apply the
%ROWTYPEattribute to the identifier.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00312: a positional parameter association may not follow a named association
Error code in OceanBase Database: 9653
SQLSTATE: HY000
Cause: When a parameter list is passed to a subprogram or cursor, if both positional and named associations are used, all positional associations must be placed in their declared order and before all named associations, which can be in any order.
Solution: Reorder parameters in the list to meet the requirements or use named associations only.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00315: Implementation restriction: unsupported table index type
Error code in OceanBase Database: 9610
SQLSTATE: HY000
Cause: A data type other than BINARY_INTEGER, PLS_INTEGER, or VARCHAR2 was specified in the
INDEX BYclause of a PL/SQL table declaration. A PL/SQL table can have one column and a primary key. The column can be of any scalar type, but the primary key must be of either the BINARY_INTEGER or VARCHAR2 type.Solution: Use a supported key type in the
INDEX BYclause.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00316: PL/SQL TABLEs must use a single index
Error code in OceanBase Database: 9631
SQLSTATE: HY000
Cause: A composite primary key was specified in the
INDEX BYclause of a PL/SQL table declaration. A PL/SQL table must have a simple, unnamed primary key of the BINARY_INTEGER or VARCHAR2 type.Solution: Use a supported key type in the
INDEX BYclause.
Note
This error code is introduced since OceanBase Database V4.0.0.
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. Here is an example: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 anassignment 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: declaration of a constant '%.*s' must contain an initialization assignment
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: 9605 and 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-00328: A subprogram body must be defined for the forward declaration of %.*s
Error code in OceanBase Database: 9587
SQLSTATE: HY000
Cause: A subprogram specification was declared, but the corresponding subprogram body was not defined. The subprogram specification and body should be written as one unit, or the specification should be separated from its body, which is necessary when you want to define mutually recursive subprograms or to group subprograms in a package.
Solution: Check the spelling of the subprogram name. Provide the missing subprogram body if necessary.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00329: schema-level type has illegal reference to %.*s
Error code in OceanBase Database: 9609
SQLSTATE: HY000
Cause: You are attempting to make a reference from a schema-level type to something other than a schema-level type.
Solution: Replace the illegal reference and retry the operation.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00357: Table,View Or Sequence reference '%s%s%s%s%s' not allowed in this context
Error code in OceanBase Database: 9680
SQLSTATE: HY000
Cause: A reference to a database table, view, or sequence was found in an inappropriate context. Such references can appear only in SQL statements or (excluding sequences) in the declarations of
%TYPEand%ROWTYPE. Here are some valid examples:SELECT ename, emp.deptno, dname INTO my_ename, my_deptno, my_dept .FROM emp, dept WHERE emp.deptno = dept.deptno; DECLARE last_name emp.ename %TYPE; dept_rec dept%ROWTYPE;.Solution: Remove or relocate the illegal reference.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00360: cursor declaration without body needs return type
Error code in OceanBase Database: 9595
SQLSTATE: HY000
Cause: Either a body (
SELECTstatement) or a return type is missing in a cursor declaration. If you want to separate a cursor specification from its body, you must provide a return type, as inCURSOR c1 RETURN emp%ROWTYPE;.Solution: Add a
SELECTstatement or return type to the cursor declaration.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00361: IN cursor '%.*s' cannot be OPEN'ed
Error code in OceanBase Database: 9594
SQLSTATE: HY000
Cause: A cursor parameter with mode IN cannot be modified, and therefore cannot be opened.
Solution: Change the cursor parameter mode to
IN-OUTorOUT.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00362: invalid cursor return type; '%.*s' must be a record type
Error code in OceanBase Database: 9593
SQLSTATE: HY000
Cause: In a cursor specification or the definition of a REF CURSOR type, a non-record type such as NUMBER or TABLE was specified as the return type. This is not allowed. Only return types in the following code are allowed:
<record_type_name><record_name>%type<table_name>%ROWTYPE<cursor_name>%ROWTYPE<cursor_variable_name>%ROWTYTPE.Solution: Revise the cursor specification or the definition of the REF CURSOR type to specify one of the above return types.
Note
This error code is introduced since OceanBase Database V4.0.0.
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. For 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
RAISEstatement with no exception name followed was found outside an exception handler.Solution: Delete the
RAISEstatement, relocate it to an exception handler, or provide the missing exception name.
Note
This error code is introduced since OceanBase Database V3.2.4.
PLS-00369: no choices may appear with choice OTHERS in an exception handler
Error code in OceanBase Database: 9596
SQLSTATE: HY000
Cause: A construct in the
WHEN excep1 OR OTHERSform was detected in the definition of an exception handler. TheOTHERShandler must appear by itself as the last exception handler in a block.Solution: Remove any identifier that appears with
OTHERSor write a separate exception handler for that identifier.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00370: OTHERS handler must be last among the exception handlers of a block
Error code in OceanBase Database: 9591
SQLSTATE: HY000
Cause: One or more exception handlers are placed after an
OTHERShandler. However, theOTHERShandler must be the last handler in a block or subprogram because it acts as the handler for all exceptions not named specifically.Solution: Move the
OTHERShandler so that it follows all specific exception handlers.
Note
This error code is introduced since OceanBase Database V4.0.0.
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: Make sure 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 handler) 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-00386: type mismatch found at '%.*s' between FETCH cursor and INTO variables
Error code in OceanBase Database: 9590
SQLSTATE: HY000
Cause: An assignment target in the
INTOlist of aFETCHstatement does not match in terms of data type with the corresponding column in the select list of the cursor declaration, and it is unclear which implicit conversion is required to correct the mismatch.Solution: Modify the cursor declaration or change the data type of the assignment target. You might want to use data type conversion functions in the select list of the query associated with the cursor.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00394: wrong number of values in the INTO list of a FETCH statement
Error code in OceanBase Database: 9660
SQLSTATE: HY000
Cause: The number of variables in the
INTOclause of aFETCHstatement does not match the number of columns in the cursor declaration.Solution: Change the number of variables in the
INTOclause or the number of columns in the cursor declaration for the numbers to match.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
Error code in OceanBase Database: 9588
SQLSTATE: HY000
Cause: A cursor was declared with a
SELECTstatement that contains duplicate column names.Solution: Use an alias to replace the duplicate column name in the
SELECTlist.
Note
This error code is introduced since OceanBase Database V4.0.0.
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. Make sure 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:
cursor_namein theCURRENT OF cursor_nameclause was not declared in aFOR UPDATEclause.Solution: Add a
FOR UPDATEclause to the definition of the cursor or do not use theCURRENT OF cursor_nameclause.
Note
This error code is introduced since OceanBase Database V3.2.4.
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 a
CURRENT OFclause names an object not a cursor.Solution: Check the spelling of the identifier. Make sure that the identifier names the cursor in the
DELETEorUPDATEstatement and that it names the cursor itself, not a FOR-loop variable.
Note
This error code is introduced since OceanBase Database V3.2.4.
PLS-00428: an INTO clause is expected in this SELECT statement
Error code in OceanBase Database: 9618
SQLSTATE: HY000
Cause: The
INTOclause was omitted in aSELECT INTOstatement. For example, the code might look likeSELECT deptno, dname, loc FROM dept WHERE ...instead ofSELECT deptno, dname, loc INTO dept_rec FROM dept WHERE ..... In PL/SQL, theINTOclause can be omitted only for a subquery.Solution: Add the required
INTOclause.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00430: FORALL iteration variable %.*s is not allowed in this context
Error code in OceanBase Database: 9612
SQLSTATE: HY000
Cause: You can use the
FORALLiteration variable only as a subscript. In other words, you cannot use it directly or as a part of an expression.Solution: Use the
FORALLvariable only as a collection subscript.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00432: implementation restriction: cannot use FORALL and BULK COLLECT INTO together in SELECT statements
Error code in OceanBase Database: 9614
SQLSTATE: HY000
Cause: The
SELECTstatement contains both theFORALLandBULK COLLECT INTOclauses.Solution: Do not use
FORALLandBULK COLLECT INTOtogether in aSELECTstatement.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00435: DML statement without BULK In-BIND cannot be used inside FORALL
Error code in OceanBase Database: 9615
SQLSTATE: HY000
Cause: The DML statement (
SELECT,INSERT,DELETE, orUPDATE) inside theFORALLstatement does not contain theBULK IN-BINDvariable.Solution: Carry the
BULK IN-BINDvariable in the DML statement (SELECT,INSERT,DELETE, orUPDATE) inside theFORALLstatement.
Note
This error code is introduced since OceanBase Database V4.0.0.
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. For example:FETCH c1 BULK COLLECT INTO var_tab LIMIT '22333';.
PLS-00439: A LIMIT clause must be used within a BULK FETCH
Error code in OceanBase Database: 9636
SQLSTATE: HY000
Cause: A
LIMITclause is used within a non-bulk fetch.Solution: Do not use a
LIMITclause within a non-bulk fetch.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00441: EXIT/CONTINUE statement may have a label here; '%.*s' is not a label
Error code in OceanBase Database: 9654
SQLSTATE: HY000
Cause: The specified name was not a label. An
EXITorCONTINUEstatement does not require a label. However, when the optional name appears, it must be a label.Solution: Check the spelling of the name. Make sure that the name is the label of a loop nested with the
EXITorCONTINUEstatement. If this statement does not need a label, delete the name.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00452: Subprogram '%.*s' violates its associated pragma
Error code in OceanBase Database: 9619
SQLSTATE: HY000
Cause: You cannot call a packaged function from SQL statements unless its purity level is asserted by coding a
RESTRICT_REFERENCESpragma in the package specification. The pragma is used to control side effects. It tells the PL/SQL compiler to deny the packaged function read/write access to database tables, public packaged variables, or both. An SQL statement that violates the pragma will cause a compilation error.Solution: Raise the purity level of the function, or ease restrictions on the pragma.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00455: cursor '%.*s' cannot be used in dynamic SQL OPEN statement
Error code in OceanBase Database: 9686
SQLSTATE: HY000
Cause: You are attempting to dynamically open a REF cursor that has a return type. However, you can open only a REF cursor without a return type by using an embedded dynamic
OPENstatement.Solution: Define a REF cursor without a return type and use it in the statement.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00457: expressions have to be of SQL types
Error code in OceanBase Database: 9620
SQLSTATE: HY000
Cause: An expression of a wrong type is used in the
USINGor dynamicRETURNINGclause. In theUSINGor dynamicRETURNINGclause, an expression cannot be of non-SQL types such as Boolean, index table, and record.Solution: Change the expression type to an SQL type.
Note
This error code is introduced since OceanBase Database V4.0.0.
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: Make sure that the data type descriptor designates a valid type. Use the
%TYPEand%ROWTYPEattributes if necessary.
PLS-00491: numeric literal required
Error code in OceanBase Database: 9604
SQLSTATE: HY000
Cause: A constant or variable was used where a numeric literal was required. For example, the code might look like
my_ename VARCHAR2(max_len);instead ofmy_ename VARCHAR2(15);. When you specify the maximum length of a VARCHAR2 variable, you must use an integral literal.Solution: Replace the identifier with a numeric literal.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00492: variable or constant initialization may not refer to functions declared in the same package
Error code in OceanBase Database: 9655
SQLSTATE: HY000
Cause: If a package
spec pdeclares a functionf, the function may not be used in any variable declarations in the same package specification. This error is caused by a circular instantiation issue. In order to fully instantiate the package specification, the variable must be initialized. To initialize the variable, the function body code in the package body must be executed. This requires that the package body is instantiated. However, the package body cannot be instantiated until the package specification is fully instantiated.Solution: Remove the reference to the function from the variable initialization. A method that is often used is to move the variable initialization from the variable declaration (in the package specification) to the package body initialization block.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00497: cannot mix between single row and multi-row (BULK) in INTO list
Error code in OceanBase Database: 9639
SQLSTATE: HY000
Cause:
When a
BULKsyntax (such asBULK COLLECT INTO) is used to retrieve data, every variable in theINTOlist must be of a type that is a collection of the type of the corresponding column.When
BULKis not used, every variable in theINTOlist must be of a type compatible with the corresponding column.
Solution: Change the
INTOlist to make sure that all variables have correct data types.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00503: RETURN value statement required for this return from function
Error code in OceanBase Database: 9634
SQLSTATE: HY000
Cause: A
RETURNstatement that contains no expression was used in a function body. In procedures, aRETURNstatement contains no expression because the statement just returns control to the caller. However, in functions, aRETURNstatement must contain an expression because its value is assigned to the function identifier.Solution: Add an expression to the
RETURNstatement.
Note
This error code is introduced since OceanBase Database V4.0.0.
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
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-00530: Illegal type used for object type attribute: '%.*s'
Error code in OceanBase Database: 9651
SQLSTATE: HY000
Cause: You are attempting to use an invalid type for an object type attribute.
Solution: Use only supported types for the object type attribute.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00531: Unsupported type in a VARRAY or TABLE type: '%.*s'
Error code in OceanBase Database: 9652
SQLSTATE: HY000
Cause: You are attempting to use an unsupported type in a
VARRAYorTABLEtype.Solution: Use only supported types in a
VARRAYorTABLEtype.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00537: A VARRAY must have a positive limit
Error code in OceanBase Database: 9611
SQLSTATE: HY000
Cause: A VARRAY type was declared with a non-positive limit, for example,
VARRAY(0).Solution: Declare the VARRAY type with a positive limit and retry the operation.
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-00551: character set ANY_CS is only allowed on a subprogram parameter
Error code in OceanBase Database: 9608
SQLSTATE: HY000
Cause: The character set
ANY_CSwas specified when it is not allowed.Solution: Change or remove the character set specification.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00566: type name '%.*s' cannot be constrained
Error code in OceanBase Database: 9607
SQLSTATE: HY000
Cause: A LOB, DATE, BOOLEAN, ROWID, or MLSLABEL type was constrained with a length specification, For example,
X BLOB(5);.Solution: Remove the constraint.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00567: cannot pass NULL to a NOT NULL constrained formal parameter
Error code in OceanBase Database: 9673
SQLSTATE: HY000
Cause: You are attempting to pass
NULLto a parameter with aNOT NULLconstraint.Solution: Pass a
NOT NULLexpression to the parameter.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00572: improper constraint form used
Error code in OceanBase Database: 9606
SQLSTATE: HY000
Cause: "number" types cannot have a range. You cannot specify the scale or precision for user-defined aggregate types or integer types. For example,
"x number(5,3)"is acceptable but"x number range 1..10"is not.Solution: Remove the constraint.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00586: a static method cannot declare a parameter named SELF
Error code in OceanBase Database: 9649
SQLSTATE: HY000
Cause: You are attempting to name a parameter
SELFwhen declaring a static method.SELFis reserved as a parameter name in a method to hold the object instance on which the method is applied. A parameter namedSELFis not allowed in static methods because static methods do not apply to a particular object instance.Solution: Change the name of the parameter in the declaration.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00587: a static method cannot be invoked on an instance value
Error code in OceanBase Database: 9527
SQLSTATE: HY000
Cause: You are attempting 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-00589: no attributes found in object type '%.*s'
Error code in OceanBase Database: 9650
SQLSTATE: HY000
Cause: A table of a non-ADT type was defined.
Solution: Tables must be of the ADT type only.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00593: default value of parameter '%.*s' in body must match that of spec
Error code in OceanBase Database: 9630
SQLSTATE: HY000
Cause: The default value initialization of a parameter in a subprogram body contained in a package body did not match that of the corresponding subprogram specification in the corresponding package specification.
Solution: Change the default value initialization of the parameter in the body to match that of the specification.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00597: expression '%.*s' in the INTO list is of wrong type
Error code in OceanBase Database: 9637
SQLSTATE: HY000
Cause: This exception is raised for the following errors:
The expression in the
INTOclause of theOPENorRETURNINGstatement is neither of valid SQL data types nor of the PL/SQLRECORDdata type.A collection of records is used in the
INTOclause of theOPENorRETURNINGstatement.A record or a collection of records is used in
BULK COLLECT INTO.
Solution: Use an expression of a correct data type in the
INTOclause.
Note
This error code is introduced since OceanBase Database V4.0.0.
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-00617: at least one result in the CASE expression must not be NULL
Error code in OceanBase Database: 9666
SQLSTATE: HY000
Cause: All the results in the
CASEexpression areNULL.Solution: Change at least one result in the
CASEexpression to a non-NULL value.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00619: the first operand in the NULLIF expression must not be NULL
Error code in OceanBase Database: 9647
SQLSTATE: HY000
Cause: The first operand in the
NULLIFexpression isNULL.Solution: Change the first operand in the
NULLIFexpression to a non-NULL value.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00621: at least one operand in the COALESCE expression must not be NULL
Error code in OceanBase Database: 9648
SQLSTATE: HY000
Cause: All operands in the COALESCE expression are
NULL.Solution: Change at least one operand in the COALESCE expression to a non-NULL value.
PLS-00629: PIPE statement cannot be used in non-pipelined functions
Error code in OceanBase Database: 9623
SQLSTATE: HY000
Cause: A
PIPEstatement was used in a non-pipelined function.Solution: Use the
PIPEstatement only in pipelined functions.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00630: pipelined functions must have a supported collection return type
Error code in OceanBase Database: 9601
SQLSTATE: HY000
Cause: A pipelined function was specified by using an unsupported return type. The following collection types are not supported as return types of pipelined functions:
Non-collections
PL/SQL tables
Associative arrays
Collections of PL/SQL types: rowid, mlslabel, long, long raw, boolean, binary_integer, pls_integer, string, and urowid
Solution: Specify a supported collection type as the return type of the pipelined function.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00633: RETURN statement in a pipelined function cannot contain an expression
Error code in OceanBase Database: 9635
SQLSTATE: HY000
Cause: A
RETURNstatement in a pipelined function contains an expression, which is not allowed. Pipelined functions must return values to the caller by using thePIPEstatement.Solution: Remove the expression from the
RETURNstatement and use aPIPEstatement to return values. Alternatively, convert the function into a non-pipelined function.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00642: local collection types not allowed in SQL statements
Error code in OceanBase Database: 9589
SQLSTATE: HY000
Cause: A locally-defined (not at the schema level) collection type was used in an SQL statement. To be accepted in an SQL statement, the type must be defined in a schema.
Solution: Define the collection type in your schema instead of in a PL/SQL subprogram.
PLS-00652: incorrect number of arguments for aggregate function
Error code in OceanBase Database: 9633
SQLSTATE: HY000
Cause: You are attempting to create an aggregate function with either
0arguments or more than999arguments.Solution: Do not create aggregate functions with
0arguments or more than999arguments.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00655: only functions can be declared as PIPELINED
Error code in OceanBase Database: 9600
SQLSTATE: HY000
Cause: Only functions can be declared as pipelined functions.
Solution: Declare a function as a pipelined function, or do not use pipelined functions.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00657: Implementation restriction: bulk SQL with associative arrays with VARCHAR2 key is not supported
Error code in OceanBase Database: 9638
SQLSTATE: HY000
Cause: A variable or expression of the associative array type was used for bulk SQL binding or defining.
Solution: Use collection types supported by bulk SQL operations.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00658: constructor method name must match type name
Error code in OceanBase Database: 9528
SQLSTATE: HY000
Cause: You are attempting 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-00659: constructor method must return SELF AS RESULT
Error code in OceanBase Database: 9646
SQLSTATE: HY000
Cause:
SELF AS RESULTwas not specified for theRETURNclause of the constructor method.Solution: Include
RETURN SELF AS RESULTin theRETURNclause.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00660: SELF parameter of constructor method must be IN OUT
Error code in OceanBase Database: 9645
SQLSTATE: HY000
Cause: The mode of the
SELFparameter of the constructor method was notIN OUT.Solution: Change the mode of the
SELFparameter toIN OUT.
Note
This error code is introduced since OceanBase Database V4.0.0.
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-00667: Element type of associative array should be pls_integer or binary_integer
Error code in OceanBase Database: 9617
SQLSTATE: HY000
Cause: You are attempting to specify an index collection whose element type was not
pls_integerorbinary_integer.Solution: Change the index collection variable type to an associative array whose element type is
pls_integerorbinary_integer.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00668: Type of expression should be a collection type
Error code in OceanBase Database: 9616
SQLSTATE: HY000
Cause: An expression is specified after the index or value of a clause that is of a non-collection type.
Solution: Change the index collection expression type to a valid collection type.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00674: references to fields of BULK In-BIND table of records or objects must have the form A(I).F
Error code in OceanBase Database: 9613
SQLSTATE: HY000
Cause: The
table(bulk_index).fieldform is the only field selection supported during runtime.Solution: Use a
FORloop instead of theFORALL DMLstatement (MERGE,INSERT,DELETE, orUPDATE) or revise the reference to fit the form allowed.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00675: invalid section for this type of Compound Trigger
Error code in OceanBase Database: 9698
SQLSTATE: HY000
Cause: The trigger event type of a compound trigger must be consistent with the object that the trigger is based on.
Solution: Define the instead of section only for a compound trigger created based on a view. Define other sections for compound triggers created based on tables.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00676: duplicate Compound Triggers section
Error code in OceanBase Database: 9699
SQLSTATE: HY000
Cause: Each compound trigger section can appear at most once in the body of the compound trigger.
Solution: Remove the offending sections.
Note
This error code is introduced since OceanBase Database V4.0.0.
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. The error code must be in the range of1-9999(excluding100) or in the range of20000-20999for 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_INITpragma is not a numeric literal (such as a variable). The second parameter must be a numeric literal in the range of1-9999(excluding100). Error codes in the range of20000-20999indicate user-defined errors.Solution: Replace the second parameter with a valid error code.
PLS-00708: Pragma %.*s must be declared in a package specification
Error code in OceanBase Database: 9603
SQLSTATE: HY000
Cause: The named
pragmawas not declared in a package specification as required. For example, the pragmaRESTRICT_REFERENCESmust be declared in a package specification.Solution: Remove or relocate the misplaced pragma.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00709: pragma %.*s must be declared in package specification and body
Error code in OceanBase Database: 9632
SQLSTATE: HY000
Cause: The named pragma was declared in a package specification but not in the corresponding package body or the other way around.
Solution: Add the pragma to the part of the package declaration that does not have the pragma.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00710: Pragma string cannot be specified here", "Pragma %s 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.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00711: PRAGMA string cannot be declared twice", "PRAGMA %.*s cannot be declared twice
Error code in OceanBase Database: 9621
SQLSTATE: HY000
Cause: A pragma was declared twice in the same block.
Solution: Remove the duplicate declaration of the pragma.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00712: illegal option for subprogram %.*s
Error code in OceanBase Database: 9626
SQLSTATE: HY000
Cause: Only top-level subprograms or subprogram declarations in PACKAGE or TYPE specifications can have the DETERMINISTIC or PARALLEL_ENABLE option. For example, this error would be returned if the options are used in a PACKAGE or TYPE body.
Solution: Remove the options.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00742: field %.*s is not yet denotable
Error code in OceanBase Database: 9669
SQLSTATE: HY000
Cause: When the fields of a record were declared, one field was used to initialize another, as in TYPE
my_rec IS RECORD (f1 varchar2(10), f2 varchar2(10) := f1);. The first field has no value until runtime. Therefore, it cannot be used to initialize another field.Solution: Remove the illegal field reference.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00904: insufficient privilege to access object string
Error code in OceanBase Database: 9625
SQLSTATE: HY000
Cause: You are attempting to operate a database object without the required privilege. For example, this error occurs when you attempt to update a table on which you only have the
SELECTprivilege, or when theACCESS BYclause of the database object prohibits the attempted compilation.Solution: Ask the database administrator to perform the operation or to grant you the required privilege.
Note
This error code is introduced since OceanBase Database V4.0.0.
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-00990: Index Tables of Cursor Variables are disallowed
Error code in OceanBase Database: 9672
SQLSTATE: HY000
Cause: The cursor cannot be used as an element of the array type.
Solution: Do not use the cursor as an element of the array type.
Note
This error code is introduced since OceanBase Database V4.0.0.
PLS-00994: Cursor Variables cannot be declared as part of a package
Error code in OceanBase Database: 9516
SQLSTATE: HY000
Cause: You are attempting 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.
PLS-00999: implementation restriction (may be temporary) %s
Error code in OceanBase Database: 9624
SQLSTATE: HY000
Cause:
The
RESULT_CACHEclause does not support functions that contain theOUTorINOUTparameter.The
RESULT_CACHEclause does not support functions whose RETURN type or IN parameter type are among the following ones:BLOB
CLOB
NCLOB
REFCURSOR
Collection
Object
The record or PL/SQL collection type that contains the preceding types
The
RESULT_CACHEclause does not support functions in anonymous blocks.The
RESULT_CACHEclause does not support pipelined functions and nested functions.
Solution: Remove the
RESULT_CACHEclause used in the preceding unsupported scenarios.
Note
This error code is introduced since OceanBase Database V4.0.0.