Applicability
This content applies only to the Oracle-compatible mode of OceanBase Database.
PLS-00001: "PL/SQL common error", "%s
OceanBase error code: 9656
SQLSTATE: HY000
Error cause: An unexpected symbol was encountered.
Solution: The symbol at the location where the error occurred is unexpected. Modify the symbol at the error location.
PLS-00103: Encountered the symbol %s when expecting one of the following: %s
OceanBase error code: 9700
SQLSTATE: HY000
Error cause: The parser has encountered a token that is not appropriate in this context.
Solution: Check the preceding tokens and the token given in the error message. The line number and column number provided in the error message indicate the end of the erroneous language structure.
PLS-00109: unknown exception name '%.*s' in PRAGMA EXCEPTION_INIT
OceanBase error code: 9583
SQLSTATE: HY000
Error cause: No declaration for the exception name referenced in the
EXCEPTION_INITdirective was found within the scope indicated by the compilation directive.Solution: Ensure that the
pragmafollows the exception declaration and is within the same scope.
PLS-00113: END identifier '%.*s' must match '%.*s
OceanBase error code: 9659
SQLSTATE: HY000
Error cause: The keyword
ENDterminates some language constructs (such as loops, blocks, functions, and procedures), after which you can place the name of that construct. For example, at the end of a loopLdefinition, 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 an incorrect block structure.Solution: Ensure that the spelling of the ending identifier matches the name given to the language construct, and that the block structure is correct.
PLS-00114: identifier ' %.*s' too long
OceanBase error code: 9526
SQLSTATE: HY000
Error cause: The PL variable name exceeds 128 characters. The maximum length for a valid identifier (including identifiers with quotes) is 128 characters. This may be because a string literal was mistakenly enclosed in double quotes instead of single quotes, in which case PL treats it as an identifier with quotes.
Solution: Shorten the identifier.
PLS-00115: this PRAGMA must follow the declaration of '%.*s
OceanBase error code: 9622
SQLSTATE: HY000
Error cause: The
pragmarefers to an undeclared or out-of-reference PL/SQL object. Identifiers must be declared before being used in apragma; forwarding references is not allowed.Solution: Check the spelling and declaration of the identifier. Also, ensure that the declaration is correctly placed within the block structure.
PLS-00119: Duplicate having-clause in table expression
OceanBase error code: 9501
SQLSTATE: HY000
Error cause: Two or more
HAVINGclauses are found in aSELECTstatement.Solution: Delete one
HAVINGclause and, if necessary, concatenate logical expressions withANDorOR.
PLS-00124: name of exception expected for first arg in exception_init pragma
OceanBase error code: 9674
SQLSTATE: HY000
Error cause: The first parameter passed to the
exception_initpragma is not an exception name.Solution: Replace the first parameter with a legally declared exception name.
PLS-00128: Illegal number of arguments for pragma EXCEPTION_INIT
OceanBase error code: 9675
SQLSTATE: HY000
Error cause: The number of arguments (compiler directives) passed to the named
pragmais incorrect. A required parameter is omitted from the list, or thepragmasyntax is incorrect (for example, a comma may be missing between two parameters).Solution: Provide the missing parameter or correct the erroneous syntax.
PLS-00130:Pragma %s expects 1st argument to be a procedure/function/package/cursor
OceanBase error code: 9661
SQLSTATE: HY000
Error cause: The first parameter (actual argument) passed to the named
pragma(compiler directive), as required, is not the name of a subprogram, package, or cursor. The parameter may be misspelled, or thepragmasyntax may be incorrect (for example, a comma may be missing between two parameters).Solution: Check the spelling of the first parameter and ensure the correct syntax is used.
PLS-00132:Pragma %s does not support %.*s
OceanBase error code: 9658
SQLSTATE:HY000
Cause: One of the parameters passed to this
pragmais not in the list of allowed values. The parameter may be misspelled, or there may be an error in thepragmasyntax (for example, a comma may be missing between two parameters).Solution: Check the spelling of all parameters and ensure the correct syntax is used.
PLS-00154:An object type may have only 1 MAP or 1 ORDER method
OceanBase error code: 9523
SQLSTATE:HY000
Cause: Multiple
MAPorORDERfunctions are declared. An object type can have only oneMAPfunction or oneORDERfunction; it cannot have multipleMAPfunctions, multipleORDERfunctions, or both.
PLS-00155:Only a function may be a MAP, ORDER or CONSTRUCTOR method
OceanBase error code: 9525
SQLSTATE:HY000
Cause: A procedure is declared as a
MAP,ORDER, orCONSTRUCTORmethod. Only functions can beMAP,ORDER, orCONSTRUCTORmethods.
PLS-00157:Only schema-level programs
allow %s
OceanBase error code: 9506
SQLSTATE:HY000
Cause: The
AUTHIDorDEFAULT COLLATIONclause is specified for a package or type. Only schema-level stored procedures, packages, and types support these clauses.Solution: Remove the clause.
PLS-00168:string'", "duplicate modifier specification '%s'
OceanBase error code: 9643
SQLSTATE:HY000
Cause: A method or object type modifier is specified multiple times.
Solution: Remove all duplicate modifiers except for one.
Note
This error code is introduced in V4.0.0.
PLS-00169:modifier '%s' conflicts with prior '%s' specification
OceanBase error code: 9642
SQLSTATE: HY000
Cause: The specified method or object type modifier conflicts with a previous modifier. For example, a final modifier cannot be combined with a non-final modifier.
Solution: Remove one of the conflicting modifiers.
Note
This error code is introduced in V4.0.0.
PLS-00172:string literal too long
OceanBase error code: 9644
SQLSTATE: HY000
Cause: The length of the string literal exceeds 32,767 bytes.
Solution: Use a string literal that is at most 32,767 bytes long.
Note
This error code is introduced in V4.0.0.
PLS-00174: a static boolean expression must be used
OceanBase error code: 9552
SQLSTATE: HY000
Cause: A dynamic Boolean expression is used.
Solution: Locate the line where the error occurs, replace variables with constants, or use conditional compilation for the variable.
PLS-00179:$ERROR: %.*s
OceanBase error code: 9540
SQLSTATE: HY000
Cause: The
$ERRORdirective is used.
PLS-00180: preprocessor directives are not supported in this context
OceanBase error code: 9553
SQLSTATE: HY000
Cause: Preprocessor directives are used incorrectly.
Solution: Use preprocessor directives correctly (such as
$IF,$THEN,$ELSE,$END, etc.) and avoid using them inside SQL or DDL statements.
PLS-00182: Identifier cannot be an empty string
OceanBase error code: 9657
SQLSTATE: HY000
Cause: An identifier is declared as an empty string.
Solution: Rename the identifier to a non-empty string.
Note
This error code is introduced in V4.0.0.
PLS-00201: identifier '%.*s' must be declared
OceanBase error codes: 5543, 5546
SQLSTATE: 42000
Cause:
References to undeclared variables, abnormal programs, or procedures.
References to types without granted privileges.
References to types with privileges only granted through roles.
Stored objects (packages, procedures, functions, triggers, views) are executed within the security domain of their owner, and no role other than
PUBLICis enabled.
Solution:
Check the spelling and declaration of the referenced name.
Verify that the declaration of the referenced item is correctly placed within a block structure.
If the referenced item is indeed declared and you believe you have the right to reference it, check the privileges.
PLS-00204:function or pseudo-column '%s' may be used inside a SQL statement only
OceanBase error code: 9682
SQLSTATE: HY000
Cause: A pseudo-column or a prohibited function is used in the program statement. SQL pseudo-columns (LEVEL, ROWID, and ROWNUM) can only be used for declaration in SQL statements. Similarly, certain functions (such as DECODE, DUMP, and VSIZE) and SQL aggregate functions (average, minimum, maximum, count, sum, STDEV, variance) can only be used within SQL statements.
Solution: Remove the reference to the pseudo-column or the function call statement from the program. Alternatively, replace the program statement with a 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'
OceanBase error code: 9547
SQLSTATE: HY000
Cause: The program object declared with the
%TYPEdata type attribute is not of an appropriate type. The type must be a variable, column, record group attribute, subprogram formal parameter, or another assignable object.Solution: Add an initialization clause to the variable declaration. If the initialization syntax is too complex, you can add a function call.
PLS-00218:a variable declared NOT NULL must have an initialization assignment
OceanBase error code: 9514
SQLSTATE: HY000
Cause: Typically, variables without an initialization clause in a declaration are automatically initialized to
NULL. This is illogical forNOT NULLvariables. Therefore, an initialization clause is required.Solution: Add an initialization clause to the variable declaration. If the initialization syntax is too complex, you can add a function call.
PLS-00221:%s' is not a procedure or is undefined
OceanBase error code: 9683
SQLSTATE: HY000
Cause: The identifier referenced as a procedure is not declared or actually represents another object (for example, it may have been declared as a function).
Solution: Check the spelling and declaration of the identifier. Also confirm that the declaration is correctly placed within the block structure.
Note
This error code is introduced in V4.0.0.
PLS-00222:no function with name '%.*s' exists in this scope
OceanBase error code: 9627
SQLSTATE: HY000
Cause: The identifier referenced as a function is not declared or actually represents another object (for example, it may have been declared as a procedure).
Solution: Check the spelling and declaration of the identifier. Also, ensure that the declaration is correctly placed within a block structure.
Note
This error code is introduced in V4.0.0.
PLS-00225: subprogram or cursor '%.*s' reference is out of scope
OceanBase error code: 9628
SQLSTATE: HY000
Cause: A prefix in a qualified name refers to a subprogram or cursor that is not within scope; that is, the subprogram or cursor name is used as a scope qualifier to refer to an entity that is not within range (within that subprogram or cursor). 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
Parsing local variable "a" in the function
x := f().a;Legal reference to component "a" of the returned record;
Illegal use of function "f" as a scope qualifier
x :=f().a;, legal reference to component "a" of the returned record
Solution:
If the intention is to reference a local variable of a non-closed function, this is not allowed; remove the reference.
If this is a parameterless function and the purpose is to access fields of the function's call result, use empty parentheses in the call.
Note
This error code is introduced in V4.0.0.
PLS-00227: subprogram 'in' formal %.*s is not yet denotable
OceanBase error code: 9598
SQLSTATE: HY000
Cause: When a formal parameter of a subprogram is declared, a parameter is used to initialize another parameter, for example:
PROCEDURE my_proc (j NUMBER, k NUMBER := j) IS .... The first parameter has no value before runtime and therefore cannot be used to initialize another parameter.Solution: Remove the illegal formal parameter reference.
Note
This error code is introduced in V4.0.0.
PLS-00230:OUT and IN OUT formal parameters may not have default expressions
OceanBase error code: 9599
SQLSTATE: HY000
Cause: When declaring formal parameters in a procedure,
OUTorIN-OUTparameters can be initialized with default values, for example:PROCEDURE calc_bonus (bonus OUT REAL := 0, ...) IS .... However, onlyINparameters can be initialized with default values.Solution: Remove the invalid default expression.
Note
This error code is introduced in V4.0.0.
PLS-00231:function '%.*s' may not be used in SQL
OceanBase error code: 9668
SQLSTATE: HY000
Cause: A prohibited function is used in an SQL statement. Some functions, such as
SQLCODEandSQLERRM, can only be used within procedural statements.Solution: Remove the function call from the SQL statement. Alternatively, replace the function call with local variables. For example, the following statement is invalid:
INSERT INTO errors VALUES (SQLCODE, SQLERRM);. However, you can assign the values ofSQLCODEandSQLERRMto local variables and then use those variables in the SQL statement, as shown below:err_num:=SQLCODE; err_msg:=SQLERRM;. Insert the error values(err_num, err_msg);.
Note
This error code is introduced in V4.0.0.
PLS-00254:OUT and IN/OUT modes cannot
be used in this context
OceanBase error code: 9502
SQLSTATE: HY000
Cause: The
USINGclause does not correctly use the actual parameter mode (OUTorIN/OUT). For theUSINGclause in anOPENstatement, only theINmode is allowed.Solution: Change the parameter mode in the
USINGclause to the correct one.
PLS-00263:mismatch between string on a subprogram specification and body
OceanBase error code: 9602
SQLSTATE: HY000
Cause: For items for which there is no equivalent clause in the package specification, the
ACCESSIBLE BYclause is specified in the package text. In the package body, this clause can only be specified on externally visible subprograms, and the subprogram specification and package body must have equivalent clauses. It cannot be specified on package local or nested subprograms.Solution: Modify the clause on the subprogram body to comply with the specification error, until 300 PH2 errors are reserved for external programs.
Note
This error code is introduced in V4.0.0.
PLS-00301:Invalid GOTO to non-label '%.*s'
OceanBase error code: 9667
SQLSTATE: HY000
Cause: The
GOTOstatement jumps to non-label content (such as a variable).Solution: Specify a valid label name.
Note
This error code is introduced in V4.0.0.
PLS-00302:component '%.*s' must be declared
OceanBase error code: 9681
SQLSTATE: HY000
Cause: The component has not been declared in the reference to it (for example, in the name "a.B", where "B" is a component of "a"). The component may be misspelled, its declaration may be incorrect, or the declaration may not be placed correctly within the block structure.
Solution: Check the spelling and declaration of the component. Also confirm that the declaration is correctly placed within the block structure.
Note
This error code is introduced in V4.0.0.
PLS-00304:cannot compile body of
'%.*s' without its specification
OceanBase error code: 9520
SQLSTATE: HY000
Cause: The compiler package specification required to compile the package body cannot be found. Possible reasons:
The software package name is misspelled.
The package specification has never been compiled.
The compiled package specification cannot be accessed. The package specification must be compiled before compiling the main body of the package, and the compiler must have access to the compiled specification.
Solution:
Check the spelling of the package name.
Compile the package specification before compiling the main body of the package.
Ensure the compiler can access the compiled specification.
PLS-00305: previous use of '%.*s'
conflicts with this use
OceanBase error code: 9529
SQLSTATE: HY000
Cause: When prechecking cursors, procedures, functions, or packages, the compiler finds another object with the same name in the same scope. Alternatively, the name in the head of a package subprogram does not match the name in its body.
Solution:
Check the spelling of cursors, procedures, functions, and the package name.
Check the names of all constants, variables, parameters, and exceptions declared within the same scope.
Delete or rename objects with duplicate names.
Modify the name in the subprogram header to match the name in the program body.
PLS-00306:wrong number or types of arguments in call to '%.*s'
OceanBase error code: 9542
SQLSTATE: HY000
Cause: This error code is reported when a subprogram call cannot match any declaration of that subprogram name. The following situations may occur:
The subprogram name may be misspelled.
Parameters may have incorrect data types.
Declarations may be incorrect or incorrectly placed within the block structure. For example, calling the built-in square root function
SQRTwith a misspelled name or parameters of incorrect data types.
Solution:
Check the spelling and declarations of the subprogram name.
Ensure its call is correct.
Ensure the parameters are of the correct data types.
If it is not a built-in function, place the declaration correctly within the block structure.
PLS-00307:too many declarations of '%.*s' match this call
OceanBase error code: 9544
SQLSTATE: HY000
Error cause: The declaration of the subprogram or cursor name is ambiguous because there is no exact match between the declaration and the call when implicit conversion of parameter data types is used, and multiple declarations match the call. Possible reasons include:
The subprogram or cursor name may be misspelled.
The declaration may be incorrect.
The declaration may not be correctly placed within the block structure.
Solution:
Check the spelling and declaration of the subprogram or cursor name.
Ensure the call is correct.
Ensure the parameters have the correct data types.
If it is not a built-in function, place the declaration correctly within the block structure.
PLS-00310:with %%ROWTYPE attribute, '%.*s' must name a table, cursor or cursor-variable
OceanBase error code: 9586
SQLSTATE: HY000
Error cause: The
%ROWTYPEattribute must be applied to an identifier declared as a cursor, cursor variable, or database table. This error occurs when%ROWTYPEfollows an undeclared identifier.Solution: Change the declaration or do not apply the
%ROWTYPEattribute to the identifier.
Note
This error code is introduced in V4.0.0.
PLS-00312:a positional parameter association may not follow a named association
OceanBase error code: 9653
SQLSTATE: HY000
Error cause: When passing a parameter list to a subprogram or cursor, if both positional associations and named associations are used, all positional associations must appear before all named associations in the order they were declared, regardless of their actual order.
Solution: Rearrange the parameter list to meet the requirement or use only named associations.
Note
This error code is introduced in V4.0.0.
PLS-00315:Implementation restriction: unsupported table index type
OceanBase error code: 9610
SQLSTATE: HY000
Cause: A data type other than BINARY_INTEGER, PLS_INTEGER, or VARCHAR2 is specified in the
INDEX BYclause of a PL/SQL table declaration. A PL/SQL table can have one column and one primary key. The column can be of any scalar type, but the primary key must be of the binary integer type or VARCHAR2.Solution: Use one of the supported key types in the
INDEX BYclause.
Note
This error code is introduced in V4.0.0.
PLS-00316:PL/SQL TABLEs must use a single index
OceanBase error code: 9631
SQLSTATE: HY000
Cause: A composite primary key is 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 one of the supported key types in the
INDEX BYclause.
Note
This error code is introduced in V4.0.0.
PLS-00318:type '%.*s' is malformed because it is a non-REF mutually recursive
type
OceanBase error code: 9539
SQLSTATE: HY000
Cause: The format of the type declaration is incorrect because it contains a non-REF mutual recursion relationship. Possible scenarios include:
Contains recursive self-reference
Contains mutual recursive reference
Solution: Use other types in the declaration to avoid recursion.
PLS-00320:the declaration of the type of this expression is incomplete or malformed
OceanBase error code: 9597
SQLSTATE: HY000
Cause: An error occurred because the name of a variable or cursor is misspelled in the declaration, or the declaration contains a forward reference. Forward references are not allowed in PL/SQL. Variables or cursors must be declared before they can be referenced in other statements, including other declarative statements. For example, the declaration of
dept_reccauses this exception because it references the cursordept_cur, which has not been declared. Example:DECLARE dept_rec dept_cur%ROWTYPE; CURSOR dept_cur IS SELECT ...Solution: Check the spelling of all identifiers in the declarations. If necessary, move the declaration so that no forward reference occurs.
PLS-00321:expression '%.*s' is
inappropriate as the left hand side of an assignment statement
OceanBase Error Code: 9513
SQLSTATE: HY000
Cause: This expression cannot appear on the left side of an assignment statement. For example, the function
SYSDATEcannot appear on the left side of an assignment statement, such asSYSDATE := '01 -JAN-1990';.Solution: Modify the incorrect assignment statement.
PLS-00322:declaration of a constant '%.*s' must contain an initialization assignment
OceanBase Error Code: 9515
SQLSTATE: HY000
Cause: A constant declaration is missing an initial value.
Solution: Declare the constant correctly.
PLS-00323:subprogram or cursor '%.*s' is declared in a package specification and must be defined in the package body
OceanBase Error Code: 9585
SQLSTATE: HY000
Cause: Cursors or subprograms declared in the package header must be defined in the package body.
Solution: Check the spelling of the subprogram name. If necessary, add the missing subprogram body to the package body.
PLS-00325:non-integral numeric literal %.*s is inappropriate in this context
OceanBase Error Codes: 9605, 9670
SQLSTATE: HY000
Cause: A non-integer numeric literal is used in a context where an integer is required.
Solution: Replace the inappropriate text with an integer text.
PLS-00328:A subprogram body must be defined for the forward declaration of %.*s
OceanBase error code: 9587
SQLSTATE: HY000
Cause: A subprogram specification has been declared, but the corresponding subprogram body is not defined. Write the specification and the body as a single unit. Another solution is to separate the specification from its body, which is necessary when you want to define mutually recursive subprograms or group subprograms into packages.
Solution: Check the spelling of the subprogram name. If necessary, provide the missing subprogram body.
Note
This error code is introduced in V4.0.0.
PLS-00329:schema-level type has illegal reference to %.*s
OceanBase error code: 9609
SQLSTATE: HY000
Cause: A reference is made from a schema-level type to a type other than a schema-level type.
Solution: Replace the illegal reference and try the operation again.
Note
This error code is introduced in V4.0.0.
PLS-00357:Table,View Or Sequence reference '%s%s%s%s%s' not allowed in this context
OceanBase error code: 9680
SQLSTATE: HY000
Cause: A reference to a database table, view, or sequence is found in an inappropriate context. Such references can only appear in SQL statements, or (except for sequences) in
%TYPEand%ROWTYPEdeclarations. The following 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 references.
Note
This error code is introduced in V4.0.0.
PLS-00360: cursor declaration without body needs return type
OceanBase error code: 9595
SQLSTATE: HY000
Cause: The cursor declaration is missing a body (a
SELECTstatement) or a return type. If you want to separate the cursor specification from its body, you must provide a return type, for example:CURSOR c1 RETURN emp%ROWTYPE;.Solution: Add a
SELECTstatement or a return type to the cursor declaration.
Note
This error code is introduced in V4.0.0.
PLS-00361: IN cursor '%.*s' cannot be OPEN'ed
OceanBase error code: 9594
SQLSTATE: HY000
Cause: The cursor parameter cannot be opened because its mode cannot be modified.
Solution: Change the cursor parameter to
IN-OUTorOUT.
Note
This error code is introduced in V4.0.0.
PLS-00362: invalid cursor return type; '%.*s' must be a record type
OceanBase error code: 9593
SQLSTATE: HY000
Cause: In a cursor specification or a definition of a REF cursor type, a non-record type (such as NUMBER or TABLE) is specified as the return type. This is not allowed. Only the following return types are allowed:
<record_type_name><record_name>%type<table_name>%ROWTYPE<cursor_name>%ROWTYPE<cursor_variable_name>%ROWTYTPE.Solution: Modify 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 in V4.0.0.
PLS-00363: expression '%.*s' cannot be used as an assignment
OceanBase error code: 9550
SQLSTATE: HY000
Cause: A statement incorrectly uses literals, constants,
INparameters, thecountervariable in a LOOP, or function calls.Solution: Modify the statement expression.
PLS-00366:subtype of a not null type must also be not null
OceanBase error code: 9684
SQLSTATE: HY000
Cause: After a subtype is defined as
NOT NULL, it cannot be 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 to eliminate the conflict.
PLS-00367:a RAISE statement with no exception name must be inside an exception handler
OceanBase error code: 9592
SQLSTATE: HY000
Cause: A RAISE statement without an exception name was found outside an exception handler.
Solution: Remove the RAISE statement, reposition it within an exception handler, or provide the missing exception name.
Note
This error code is introduced in V3.2.4.
PLS-00369:no choices may appear with choice OTHERS in an exception handler
OceanBase error code: 9596
SQLSTATE: HY000
Cause: The
WHEN excep1 OR OTHERSform construct is encountered in the definition of an exception handler. TheOTHERShandler must appear separately as the last exception handler in the block.Solution: Remove the identifier that appears together with other identifiers, or write a separate exception handler for that identifier.
Note
This error code is introduced in V4.0.0.
PLS-00370:OTHERS handler must be last among the exception handlers of a block
OceanBase error code: 9591
SQLSTATE: HY000
Cause: One or more exception handlers appear after other handlers. The
OTHERShandler must be the last handler in a block or subprogram because it serves as the handler for all unspecified exceptions.Solution: Move the
OTHERShandler so that it follows all specific exception handlers.
Note
This error code is introduced in V4.0.0.
PLS-00371:at most one declaration for
'%.*s' is permitted
OceanBase error code: 9507
SQLSTATE: HY000
Cause: The reference to the variable is ambiguous because the variable has multiple declarations. In the declarative part of a block, procedure, or function, at most one local variable with the given identifier is allowed. A given variable can appear at most once in a block.
Solution: Check the spelling of the variable. If necessary, delete all declarations of the variable and retain only one.
PLS-00372:In a procedure, RETURN statement cannot contain an expression
OceanBase error code: 5583
SQLSTATE: 42000
Cause: In a procedure, the
RETURNstatement contains an expression, which is not allowed.Solution: Remove the expression from the
RETURNstatement, or redefine the procedure as a function.
PLS-00373:EXIT/CONTINUE label '%.*s'
must label a LOOP statement
OceanBase error code: 9512
SQLSTATE: HY000
Cause: The label in the
EXITorCONTINUEstatement does not refer to aLOOPstatement. TheEXITorCONTINUEstatement does not require a label. If a label is specified (such as inEXIT my_labelorCONTINUE my_label), the label must refer to aLOOPstatement.Solution: Ensure the label name is spelled correctly and refers to a
LOOPstatement.
PLS-00375:illegal GOTO statement; this GOTO cannot branch to label '%.*s'
OceanBase error code: 9505
SQLSTATE: HY000
Cause: A
GOTOstatement branches from outside a structured sequence of statements (such as a loop or exception handler) to a label within that sequence. Such branching is not allowed.Solution: Move the
GOTOstatement inside the sequence of statements, or move the labeled statement outside the sequence.
PLS-00376:illegal EXIT/CONTINUE
statement; it must appear inside a loop
OceanBase error code: 9510
SQLSTATE: HY000
Cause: An
EXITorCONTINUEstatement was found outside a loop structure. TheEXITstatement terminates the loop prematurely, while theCONTINUEstatement resumes the next iteration of the loop. Both statements must always be within a loop.Solution: Remove the
EXITorCONTINUEstatement, or place it inside a loop structure.
PLS-00382:expression is of wrong type
OceanBase error code: 9519
SQLSTATE: HY000
Cause: The expression has an incorrect data type.
Solution: Change the data type of the expression. You may need to use data type conversion functions.
PLS-00386:type mismatch found at '%.*s' between FETCH cursor and INTO variables
OceanBase error code: 9590
SQLSTATE: HY000
Cause: The data types of the assignment targets in the
INTOlist of theFETCHstatement do not match the corresponding columns in the select-list declared by the cursor, and it is unclear which implicit conversion is needed to resolve the mismatch.Solution: Modify the cursor declaration or change the data types of the assigned targets. You may want to use data type conversion functions in the select-list of the query associated with the cursor.
Note
This error code is introduced in V4.0.0.
PLS-00394:wrong number of values in the INTO list of a FETCH statement
OceanBase error code: 9660
SQLSTATE: HY000
Cause: The number of variables in the
INTOclause of theFETCHstatement does not match the number of columns in the cursor declaration.Solution: Adjust the number of variables in the
INTOclause or the number of columns in the cursor declaration to match.
Note
This error code is introduced in V4.0.0.
PLS-00402:alias required in SELECT list of cursor to avoid duplicate column names
OceanBase error code: 9588
SQLSTATE: HY000
Cause: The cursor was declared with a
SELECTstatement that contains duplicate column names.Solution: Replace the duplicate column names in the "SELECT" list with aliases.
Note
This error code is introduced in V4.0.0.
PLS-00403:expression '%.*s' cannot be used as an INTO-target of a SELECT/FETCH statement
OceanBase error code: 9665
SQLSTATE: HY000
Cause: The
FETCHstatement cannot assign values to itsINTOlist because the target is not a legally formed and declared variable. For example, the following assignment is illegal because'Jones'is a string, not a variable:FETCH my_cur INTO 'Jones'.Solution: Check the spelling and declaration of the assigned target. Ensure that the rules for forming variable names are followed.
PLS-00404: cursor '%.*s' must be declared with FOR UPDATE to use with CURRENT OF
OceanBase error code: 9693
SQLSTATE: HY000
Cause: The
cursor_namein theCURRENT OF cursor_nameclause has not been declared in theFOR UPDATEclause.Solution: Add a
FOR UPDATEclause to the cursor definition or do not use theCURRENT OF cursor_nameclause.
Note
This error code is introduced in V3.2.4.
PLS-00410: duplicate fields in
RECORD,TABLE or argument list are not permitted
OceanBase error code: 9508
SQLSTATE: HY000
Cause: When declaring a user-defined record, two fields have the same name. Like column names in a database table, user-defined field names must be unique.
Solution: Check the spelling of the field names and remove the duplicate names.
PLS-00413: identifier in CURRENT OF clause is not a cursor name
OceanBase error code: 9692
SQLSTATE: HY000
Cause: The identifier in the
CURRENT OFclause refers to an object rather than a cursor.Solution: Check the spelling of the identifier. Ensure that the identifier refers to the cursor itself in the
DELETEorUPDATEstatement, not a FOR loop variable.
Note
This error code is introduced in V3.2.4.
PLS-00428: an INTO clause is expected in this SELECT statement
OceanBase error code: 9618
SQLSTATE: HY000
Cause: The
INTOclause is omitted in aSELECT INTOstatement. For example, the code is similar toSELECT deptno, dname, loc FROM dept WHERE ...instead ofSELECT deptno, dname, loc INTO dept_rec FROM dept WHERE .... In PL/SQL, only subqueries can lack anINTOclause.Solution: Add the
required INTOclause.
Note
This error code is introduced in V4.0.0.
PLS-00430:FORALL iteration variable %.*s is not allowed in this context
OceanBase error code: 9612
SQLSTATE: HY000
Cause: A
FORALLiteration variable can only be used as an index. It cannot be used directly or as part of an expression.Solution: Use the
FORALLvariable only as a collection index.
Note
This error code is introduced in V4.0.0.
PLS-00432:implementation restriction: cannot use FORALL and BULK COLLECT INTO together in SELECT statements
OceanBase error code: 9614
SQLSTATE: HY000
Cause: A
SELECTstatement contains both theFORALLandBULK COLLECT INTOphrases.Solution: You cannot use both the
FORALLandBULK COLLECT INTOphrases in aSELECTstatement.
Note
This error code is introduced in V4.0.0.
PLS-00435:DML statement without BULK In-BIND cannot be used inside FORALL
OceanBase error code: 9615
SQLSTATE: HY000
Cause: A DML (
SELECT/INSERT/DELETE/UPDATE) statement in aFORALLstatement does not contain aBULK IN-BINDvariable.Solution: A DML (
SELECT/INSERT/DELETE/UPDATE) statement in aFORALLstatement must contain aBULK IN-BINDvariable.
Note
This error code is introduced in V4.0.0.
PLS-00437: FORALL bulk index cannot be used in INTO clause
OceanBase error code: 9836
SQLSTATE: HY000
Cause: The
FORALLbulk index cannot be used in theINTOclause.Solution: Ensure that the
FORALLstatement is used only for pure DML operations.
Note
This error code is introduced in V4.5.0.
PLS-00440: FORALL bulk IN-bind variables cannot be used here
OceanBase error code: 9837
SQLSTATE: HY000
Cause:
FORALLbulk input bind variables cannot be used here.Solution: Place the variable processing logic in the correct location.
Note
This error code is introduced in V4.5.0.
PLS-00431: bulk SQL attributes must use a single index
OceanBase error code: 9838
SQLSTATE: HY000
Cause: The bulk SQL attributes do not use a single index.
Solution: Use a single index.
Note
This error code is introduced in V4.5.0.
PLS-00438: value in LIMIT clause
\'%.*s\' use is invalid
OceanBase error code: 9518
SQLSTATE: HY000
Error cause: The data type of the value in the
LIMITclause followingFETCH 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 in the
LIMITclause to be 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
OceanBase error code: 9636
SQLSTATE: HY000
Error cause: The
LIMITclause is used in a non-bulk fetch operation.Solution: Do not use the
LIMITclause when performing a non-bulk fetch.
Note
This error code is introduced in V4.0.0.
PLS-00441:EXIT/CONTINUE statement may have a label here; '%.*s' is not a label
OceanBase error code: 9654
SQLSTATE: HY000
Error cause: The specified name is not a label. The
EXITorCONTINUEstatement does not require a label, but if an optional name is provided, it must be a label.Solution: Check the spelling of the name. Ensure the name is a label for the loop that embeds the
EXITorCONTINUEstatement. If this statement does not require a label, remove the name.
Note
This error code is introduced in V4.0.0.
PLS-00452:Subprogram '%.*s' violates its associated pragma
OceanBase error code: 9619
SQLSTATE: HY000
Error cause: A packaged function cannot be called from an SQL statement unless its purity level is declared by encoding the
RESTRICT_REFERENCESpragma in the package specification. The pragma is used to control side effects; it tells the PL/SQL compiler to deny read/write access to database tables, public package variables, or both. An SQL statement that violates this pragma will result in a compilation error.Solution: Increase the function's purity level or relax the pragma restrictions.
Note
This error code is introduced in V4.0.0.
PLS-00455: cursor '%.*s' cannot be used in dynamic SQL OPEN statement
OceanBase error code: 9686
SQLSTATE: HY000
Cause: A REF cursor with a return type is dynamically opened. However, only REF cursors without a return type can be opened by the
embededdynamicOPENstatement.Solution: Define a REF cursor without a return type and use it in the statement.
Note
This error code is introduced in V4.0.0.
PLS-00457:expressions have to be of SQL types
OceanBase error code: 9620
SQLSTATE: HY000
Cause: The expressions in the
USINGordynamic RETURNINGclause are of incorrect types. In theUSINGordynamic RETURNINGclause, expressions cannot be non-SQL types, such as booleans, index tables, or records.Solution: Change the expression types to SQL types.
Note
This error code is introduced in V4.0.0.
PLS-00485: in exception handler, '%.*s' must be an exception name
OceanBase error code: 5545
SQLSTATE: 42000
Cause: An identifier that is not declared as an exception appears in the
WHENclause of an exception handler. Only exception names are valid in theWHENclause.Solution: Check the spelling of the exception name and ensure it is correctly declared as an exception.
PLS-00488: '%.*s' must be a type
OceanBase error code: 9543
SQLSTATE: HY000
Cause: The data type specifier in a declaration or expression does not specify a valid type. Possible scenarios include:
The
%TYPEattribute may not have been added to the declaration. For example, inDECLARE my_sal emp.sal%TYPE;my_ename emp.ename;,%TYPEis not declared.To automatically provide the data type of a column when declaring a constant or variable, you can use the
%TYPEattribute.To automatically provide the data type of a row when declaring a record, you can use the
%ROWTYPEattribute.
Solution: Ensure the data type specifier specifies a valid type. Use the
%TYPEand%ROWTYPEattributes if necessary.
PLS-00491: numeric literal required
OceanBase error code: 9604
SQLSTATE: HY000
Cause: A literal or variable is used where a numeric constant is required. For example, in
my_ename VARCHAR2(max_len);instead ofmy_ename VARCHAR2(15);, an integer literal must be used when specifying the maximum length of a VARCHAR2 variable.Solution: Replace the identifier with a numeric constant.
Note
This error code is introduced in V4.0.0.
PLS-00492: variable or constant initialization may not refer to functions declared in the same package
OceanBase error code: 9655
SQLSTATE: HY000
Cause: If a package
spec pdeclares a functionf, then this function cannot under any circumstances use variable declarations from the same package specification. This is due to the issue of circular instantiation: to fully instantiate a package specification, variables must be initialized. To initialize variables, the code in the function body within the package body must be executed. This requires instantiating the package body. However, the package body cannot be instantiated before the package specification is fully instantiated.Solution: Remove references to the function from the variable initialization. A common technique 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 in V4.0.0.
PLS-00497:cannot mix between single row and multi-row (BULK) in INTO list
OceanBase error code: 9639
SQLSTATE: HY000
Cause:
When using the
BULKsyntax (for example,BULK COLLECT INTO) to retrieve data, the type of each variable in the inputINTOlist must be a collection of the corresponding column types.If the
BULKsyntax is not used, each variable in theINTOlist must be of a type compatible with the corresponding column.
Solution: Modify the
INTOlist so that all variables have the correct data types.
Note
This error code is introduced in V4.0.0.
PLS-00503:RETURN value statement required for this return from function
OceanBase error code: 9634
SQLSTATE: HY000
Cause: A return statement without an expression was used within the function body. In procedures, a
RETURNstatement can be without an expression because it simply 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 in V4.0.0.
PLS-00520:MAP methods must be
declared without any parameters other than (optional) SELF
OceanBase error code: 9532
SQLSTATE: HY000
Cause: Parameters were declared for a
MAPmember function. AMAPmember function can have only one parameter: the defaultSELFparameter.MAPfunctions cannot be declared with any parameters; the compiler adds theSELFparameter.Solution: Remove the parameters from the
MAPfunction.
PLS-00521: ORDER methods must be
declared with 1 (one) parameter in addition to (optional) SELF
OceanBase error code: 9538
SQLSTATE: HY000
Cause: An
ORDERfunction is declared without a user-specified parameter. TheORDERfunction has two parameters: a defaultSELFparameter added by the compiler, and a second parameter added by the user, which must be of the same type as the enclosing object.Solution: Modify the parameter types.
PLS-00522: MAP methods must return a
scalar type
OceanBase error code: 9531
SQLSTATE: HY000
Cause: A
MAPmember function is written to return a non-scalar type.Solution: Rewrite the
MAPfunction to return a scalar type.
PLS-00523: ORDER methods must return
an INTEGER
OceanBase error code: 9533
SQLSTATE: HY000
Cause: The
ORDERfunction returns a type other than an integer.Solution: Rewrite the
ORDERfunction to return an integer type.
PLS-00524: The parameter type in an
ORDER method must be the containing object type
OceanBase error code: 9534
SQLSTATE: HY000
Cause: An
ORDERfunction is declared without a user-specified parameter. TheORDERfunction has two parameters: a defaultSELFparameter added by the compiler, and a second parameter added by the user, which must be of the same type as the enclosing object.Solution: Modify the parameter types.
PLS-00525: Within SQL statements, only
equality comparisons of objects are allowed without a map or order function
OceanBase error code: 9535
SQLSTATE: HY000
Cause: No
MAPorORDERfunction is provided for the comparison. If noMAPorORDERfunction is provided, only equality comparison is allowed.Solution: Provide the
MAPorORDERfunction for the object, or modify the program to use only equality comparison.
PLS-00526: A MAP or ORDER function is required for comparing objects in PL/
SQL
OceanBase error code: 9524
SQLSTATE: HY000
Cause: The
MAPorORDERfunction is not defined for comparing objects in PL code.Solution: Define the
MAPorORDERfunction and try the operation again.
PLS-00527: MAP or ORDER functions
require a PRAGMA RESTRICT_REFERENCES specifying :WNDS,WNPS,RNPS,RNDS
OceanBase error code: 9536
SQLSTATE: HY000
Cause:
The
pragma restrict_referencesclause is not specified.The
pragma restrict_referencesclause is specified, but any one of the following parameters is missing:WNDS,WNPS,RNPS, orRNDS.
Solution: Add or correct the
pragmaclause and try the operation again.
PLS-00528: The parameters to an ORDER
function must have IN mode
OceanBase error code: 9537
SQLSTATE: HY000
Cause: You declared the parameters of the
ORDERfunction asOUTorIN OUTmode.Solution: Correct the parameter declaration to
INmode.
PLS-00530:Illegal type used for object type attribute: '%.*s'
OceanBase error code: 9651
SQLSTATE:HY000
Cause: An invalid type is used for an object type attribute.
Solution: Use only supported types for object type attributes.
Note
This error code is introduced in V4.0.0.
PLS-00531:Unsupported type in a VARRAY or TABLE type: '%.*s'
OceanBase error code: 9652
SQLSTATE:HY000
Cause: An unsupported type is used for a
VARRAYorTABLE type.Solution: Use only supported types for
VARRAYorTABLE type.
Note
This error code is introduced in V4.0.0.
PLS-00537:A VARRAY must have a positive limit
OceanBase error code: 9611
SQLSTATE:HY000
Cause: A VARRAY type is declared with a non-positive limit, for example,
VARRAY(0).Solution: Declare a VARRAY type with a positive limit and try the operation again.
PLS-00538: subprogram or cursor '%.*s'
is declared in an object type specification and must be defined in the object type body
OceanBase error code: 9522
SQLSTATE: HY000
Cause: The specified subprogram is declared in the specification of the object type but not defined in the body of the object type.
Solution: Define the subprogram in the body of the object type, or remove 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
OceanBase error code: 9521
SQLSTATE: HY000
Cause: The specified subprogram is declared in the body of the object type but not defined in the specification of the object type. Cursors do not need to be defined in the body.
Solution: Define the subprogram in the specification of the object type, or remove the declaration from the body.
PLS-00551:character set ANY_CS is only allowed on a subprogram parameter
OceanBase error code: 9608
SQLSTATE: HY000
Cause: The character set
ANY_CSis specified where it is not allowed.Solution: Modify or remove the character set specification.
Note
This error code is introduced in V4.0.0.
PLS-00566:type name '%.*s' cannot be constrained
OceanBase error code: 9607
SQLSTATE: HY000
Cause: Types such as LOB, DATE, BOOLEAN, ROWID, or MLSLABEL are constrained by length specifications. For example:
X BLOB(5);.Solution: Remove the constraint.
Note
This error code is introduced in V4.0.0.
PLS-00567: cannot pass NULL to a NOT NULL constrained formal parameter
OceanBase error code: 9673
SQLSTATE: HY000
Cause: A
NULLvalue is passed to a formal parameter with a NOT NULL constraint.Solution: Pass a non-null expression.
Note
This error code is introduced in V4.0.0.
PLS-00572: improper constraint form used
OceanBase error code: 9606
SQLSTATE: HY000
Cause: The "number" type does not support a range. User-defined aggregate types and integer types do not support specifying scale or precision. 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 in V4.0.0.
PLS-00586: a static method cannot declare a parameter named SELF
OceanBase error code: 9649
SQLSTATE: HY000
Cause: The parameter
SELFis used in the declaration of a static method.SELFis reserved as a parameter name in the method to hold the object instance that calls the method. Static methods do not allow a parameter namedSELFbecause they are not applicable to specific object instances.Solution: Change the name of the parameter in the declaration.
Note
This error code is introduced in V4.0.0.
PLS-00587: a static method cannot be
invoked on an instance value
OceanBase error code: 9527
SQLSTATE: HY000
Cause: You tried to use an object instance value instead of the type name as the qualifier for a method call, but only the type name can be used as a qualifier when calling a static method.
Solution: If a method is static, use the type name rather than an object instance value to qualify the method name.
PLS-00589: no attributes found in object type '%.*s'
OceanBase error code: 9650
SQLSTATE: HY000
Cause: A table of a non-ADT type was defined.
Solution: Table types should be of the ADT type only.
Note
This error code is introduced in V4.0.0.
PLS-00593: default value of parameter '%.*s' in body must match that of spec
OceanBase error code: 9630
SQLSTATE: HY000
Cause: The default value initialization for a parameter in the subprogram body within the package body does not match the default value initialization in the corresponding subprogram specification within the package specification.
Solution: Modify the default initialization of the parameter in the package body to match the initialization in
spec.
Note
This error code is introduced in V4.0.0.
PLS-00597: expression '%.*s' in the INTO list is of wrong type
OceanBase error code: 9637
SQLSTATE: HY000
Cause: This exception is raised for the following errors:
The expression in the
INTOclause of anOPENorRETURNINGstatement is neither a valid SQL data type nor a PL/SQL record data type.A record set is used in the
INTOclause of anOPENorRETURNINGstatement.A record or record set is used for
BULK COLLECT INTO.
Solution: Use an expression with the correct data type in the
INTOclause.
Note
This error code is introduced in V4.0.0.
PLS-00594:the SELF parameter can be declared only as IN or as IN OUT
OceanBase error code: 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
OceanBase error code: 9666
SQLSTATE: HY000
Cause: All results in the
CASEexpression are the textNULL.Solution: Change at least one result in the
CASEexpression to a non-NULLvalue.
Note
This error code is introduced in V4.0.0.
PLS-00619:the first operand in the NULLIF expression must not be NULL
OceanBase error code: 9647
SQLSTATE: HY000
Cause: The first operand in the
NULLIFexpression is the textNULL.Solution: Change the first operand in the
NULLIFexpression to anon-NULLvalue.
Note
This error code is introduced in V4.0.0.
PLS-00621:at least one operand in the COALESCE expression must not be NULL
OceanBase error code: 9648
SQLSTATE: HY000
Cause: All operands in the COALESCE expression are the text
NULL.Solution: Change at least one operand in the COALESCE expression to
non-NULL.
PLS-00629:PIPE statement cannot be used in non-pipelined functions
OceanBase error code: 9623
SQLSTATE: HY000
Cause: The
PIPEstatement is used in a non-pipeline function.Solution: Use the
PIPEstatement only in pipeline functions.
Note
This error code is introduced in V4.0.0.
PLS-00630:pipelined functions must have a supported collection return type
OceanBase error code: 9601
SQLSTATE: HY000
Cause: A pipeline function is specified with an unsupported return type. The following collection types are not supported as the return type of a pipeline function:
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 pipeline function.
Note
This error code is introduced in V4.0.0.
PLS-00633:RETURN statement in a pipelined function cannot contain an expression
OceanBase error code: 9635
SQLSTATE: HY000
Cause: A RETURN statement in a pipelined function contains an expression, which is not allowed. Pipelined functions must use the PIPE statement to send values back to the caller.
Solution: Remove the expression from the RETURN statement and use the PIPE statement to return the value. Otherwise, convert the function to a non-pipelined function.
Note
This error code is introduced in V4.0.0.
PLS-00642:local collection types not allowed in SQL statements
OceanBase error code: 9589
SQLSTATE: HY000
Cause: A local-defined (that is, non-schema-level) collection type is used in an SQL statement. This type must be defined in the architecture before it can be accepted in an SQL statement.
Solution: Define the collection type in the schema, not in the PL/SQL subprogram.
PLS-00652:incorrect number of arguments for aggregate function
OceanBase error code: 9633
SQLSTATE: HY000
Cause: An aggregate function is created with
0or more than999parameters.Solution: Do not create aggregate functions with
0or more than999parameters.
Note
This error code is introduced in V4.0.0.
PLS-00655:only functions can be declared as PIPELINED
OceanBase error code: 9600
SQLSTATE: HY000
Cause: The PIPELINED type can only be defined in a FUNCTION.
Solution: Change the statement type to FUNCTION, or remove the PIPELINED usage.
Note
This error code is introduced in V4.0.0.
PLS-00657:Implementation restriction: bulk SQL with associative arrays with VARCHAR2 key is not supported
OceanBase error code: 9638
SQLSTATE: HY000
Cause: A variable or expression of the associative array type is used for batch SQL binding or definition.
Solution: Use a collection type that is supported by bulk SQL.
Note
This error code is introduced in V4.0.0.
PLS-00658:constructor method name must match type name
OceanBase error code: 9528
SQLSTATE: HY000
Cause: You try to use an object instance value instead of the type name as the qualifier for a method call name. However, only the type name can be used as a qualifier when calling a static method.
Solution: If the method is static, use the type name instead of the object instance value to qualify the method name.
PLS-00659:constructor method must return SELF AS RESULT
OceanBase error code: 9646
SQLSTATE: HY000
Cause: The
returnclause of the constructor method does not specifySELFas the result.Solution: Modify the
returnclause to includereturn SELFas the result.
Note
This error code is introduced in V4.0.0.
PLS-00660:SELF parameter of constructor method must be IN OUT
OceanBase error code: 9645
SQLSTATE: HY000
Cause: The mode of the
SELFparameter in the constructor is notIN OUT.Solution: Change the mode of the
SELFparameter toIN OUT.
Note
This error code is introduced in V4.0.0.
PLS-00661:RETURN statement in a CONSTRUCTOR cannot include an expression
OceanBase error code: 9541
SQLSTATE: HY000
Cause: An expression exists in the
RETURNstatement of theCONSTRUCTORbody.Solution: Remove the expression from the
RETURNstatement.
PLS-00667:Element type of associative array should be pls_integer or binary_integer
OceanBase error code: 9617
SQLSTATE: HY000
Cause: The index set specifies an element type that is not
pls_integerorbinary_integer.Solution: Change the index set variable type to an associative array whose element type is
pls_integerorbinary_integer.
Note
This error code is introduced in V4.0.0.
PLS-00668:Type of expression should be a collection type
OceanBase error code: 9616
SQLSTATE: HY000
Cause: An expression is specified after an index or value in a clause whose type is not a collection type.
Solution: Change the index/set expression type to a valid collection type.
Note
This error code is introduced in V4.0.0.
PLS-00674:references to fields of BULK In-BIND table of records or objects must have the form A(I).F
OceanBase error code: 9613
SQLSTATE: HY000
Cause: The form
table(bulk_index).fieldis the only field selection supported at runtime.Solution: Use a
FORloop instead of aFORALL DMLstatement (MERGE/INSERT/DELETE/UPDATE), or modify the reference to conform to the allowed form.
Note
This error code is introduced in V4.0.0.
PLS-00675:invalid section for this type of Compound Trigger
OceanBase error code: 9698
SQLSTATE: HY000
Cause: The trigger event type of a compound trigger must be consistent with the object on which the trigger is based.
Solution: If a compound trigger is based on a view, only the
Instead oftrigger event can be defined. If it is based on a table, only events other than theInstead oftrigger event can be defined.
Note
This error code is introduced in V4.0.0.
PLS-00676:duplicate Compound Triggers section
OceanBase error code: 9699
SQLSTATE: HY000
Cause: Each
Compound Triggerssection can appear at most once in the body of a compound trigger.Solution: Remove the duplicate section.
Note
This error code is introduced in V4.0.0.
PLS-00701:illegal ORACLE error number %.*s for PRAGMA EXCEPTION_INIT
OceanBase error code: 9629
SQLSTATE: HY000
Cause: The error code number passed to the
EXCEPTION_INITpragma is out of range. Error codes within the1-9999range (excluding100) or the20000-20999range are used for user-defined errors.Solution: Use a valid error code number.
PLS-00702:second argument to PRAGMA EXCEPTION_INIT must be a numeric literal
OceanBase error code: 9676
SQLSTATE: HY000
Cause: The second parameter passed to the
EXCEPTION_INITpragma is not a numeric literal (e.g., a variable). The second parameter must be an error code within the1-9999(excluding100) range, or the20000-20999range for user-defined errors.Solution: Replace the second parameter with a valid error code.
PLS-00708:Pragma %.*s must be declared in a package specification
OceanBase error code: 9603
SQLSTATE: HY000
Cause: The
pragmais not declared as required in the package specification. For example,RESTRICT_REFERENCESmust be declared in the package specification.Solution: Remove or reposition the misplaced pragma.
Note
This error code is introduced in V4.0.0.
PLS-00709:pragma %.*s must be declared in package specification and body
OceanBase error code: 9632
SQLSTATE: HY000
Cause: A named
pragmais declared in the package specification but not in the corresponding package body, or vice versa.Solution: Add the
pragmato the part of the package declaration that does not contain apragma.
Note
This error code is introduced in V4.0.0.
PLS-00710: "Pragma string cannot be specified here", "Pragma %s cannot be specified here
OceanBase error code: 9509
SQLSTATE: HY000
Cause: The
AUTONOMOUS_TRANSACTIONpragma cannot be specified here.Solution: Check whether the program name is spelled correctly.
Note
This error code is introduced in V4.0.0.
PLS-00711: "PRAGMA string cannot be declared twice", "PRAGMA %.*s cannot be declared twice
OceanBase error code: 9621
SQLSTATE: HY000
Cause: The
PRAGMAstatement is declared twice in the same block.Solution: Remove duplicate declarations of
PRAGMA.
Note
This error code is introduced in V4.0.0.
PLS-00712: illegal option for subprogram %.*s
OceanBase error code: 9626
SQLSTATE: HY000
Cause: The "DETERMINISTIC" or "PARALLEL_ENABLE" option can only be specified for top-level subprograms or for subprograms declared in package or type specifications. For example, specifying this option inside a package or type body will cause this error.
Solution: Remove this option.
Note
This error code is introduced in V4.0.0.
PLS-00742: field %.*s is not yet denotable
OceanBase error code: 9669
SQLSTATE: HY000
Cause: When declaring fields for a record, one field is used to initialize another. For example, when entering
my_rec IS record(f1 varchar2(10), f2 varchar2(10):=f1);, the first field has no value before runtime and therefore cannot be used to initialize the other field.Solution: Remove the invalid field reference.
Note
This error code is introduced in V4.0.0.
PLS-00753: malformed or corrupted wrapped unit
OceanBase error code: 9806
SQLSTATE: HY000
Cause: Attempt to load or execute a corrupted wrapped PL/SQL unit.
Solution: Check the integrity of the wrapped code to ensure the format of the wrapped PL/SQL code is not damaged or incomplete.
PLS-00904:insufficient privilege to access object string
OceanBase error code: 9625
SQLSTATE: HY000
Cause: An operation is performed on a database object without the required privileges. For example, this error occurs if you attempt to update a table for which only the
SELECTprivilege is granted, or if theACCESS BYclause of a database object prohibits compilation.Solution: Ask the DBA to perform the operation or grant you the required privileges.
Note
This error code is introduced in V4.0.0.
PLS-00905:object '%.*s' is invalid
OceanBase error code: 9548
SQLSTATE: HY000
Cause: References an invalid package specification or subprogram. A package or subprogram is invalid if its source code or any database objects it references have been discarded, replaced, or modified since the last compilation.
Solution: Identify the cause of the invalid package specification or subprogram and ensure it can be recompiled correctly.
PLS-00990:Index Tables of Cursor Variables are disallowed
OceanBase error code: 9672
SQLSTATE: HY000
Cause: Cursor variables cannot be used as elements of an array.
Solution: Check the types of the array elements and avoid using cursor types.
Note
This error code is introduced in V4.0.0.
PLS-00994:Cursor Variables cannot be
declared as part of a package
OceanBase error code: 9516
SQLSTATE: HY000
Cause: Attempting to declare a cursor variable within a package specification is not allowed. Although
REF CURSORtypes can be defined within PL blocks, subprograms, or packages, cursor variables can only be declared within blocks or subprograms.Solution: Move the cursor variable declaration into a PL block or subprogram.
PLS-00999:implementation restriction (may be temporary) %s
OceanBase error code: 9624
SQLSTATE: HY000
Cause:
RESULT_CACHE does not support functions that have OUT or INOUT parameters.
RESULT_CACHE does not support functions whose RETURN type or IN parameter types include any of the following:
BLOB
CLOB
NCLOB
REFCURSOR
Collection
Object
Records or PL/SQL collection types that contain the above types
RESULT_CACHE does not support functions within anonymous blocks.
RESULT_CACHE is not supported for PIPELINE FUNCTION and NESTED FUNCTION.
Solution: Remove RESULT_CACHE from the usage scenarios where it is not supported.
Note
This error code is introduced in V4.0.0.
