PLS-00000 to PLS-00999

2024-03-05 01:54:26  Updated

Applicability

This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.

PLS-00001: PL/SQL common error", "%s

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 9583

  • SQLSTATE: HY000

  • Cause: The declaration of the exception name referenced in the EXCEPTION_INIT pragma is not found in the scope of pragmas.

  • Solution: Ensure that the pragmas comply with the exception declaration and are within the same scope.

PLS-00113: END identifier '%.*s' must match '%.*s

  • OceanBase error code: 9659

  • SQLSTATE: HY000

  • Cause: The keyword END terminates 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 loop L, you might write END 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

  • OceanBase error code: 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

  • OceanBase error code: 9622

  • SQLSTATE: HY000

  • Cause: The pragma refers 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

  • OceanBase error code: 9501

  • SQLSTATE: HY000

  • Cause: The SELECT statement contains two or more HAVING clauses.

  • Solution: Delete one HAVING clause, and use AND or OR to connect logical expressions when necessary.

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

  • OceanBase error code: 9674

  • SQLSTATE: HY000

  • Cause: The first argument passed to the EXCEPTION_INIT pragma 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 9523

  • SQLSTATE: HY000

  • Cause: Multiple MAP or ORDER functions were declared. One object type can have only one MAP or ORDER function.

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 the MAP, ORDER, or CONSTRUCTOR method. Only functions can be declared as the MAP, ORDER, or CONSTRUCTOR method.

PLS-00157: Only schema-level programs allow %s

  • OceanBase error code: 9506

  • SQLSTATE: HY000

  • Cause: The AUTHID or DEFAULT COLLATION clause 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'

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 9540

  • SQLSTATE: HY000

  • Cause: The $ERROR directive is used.

PLS-00182: Identifier cannot be an empty string

  • OceanBase error code: 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

  • OceanBase error code: 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 PUBLIC are 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

  • OceanBase error code: 9682

  • SQLSTATE: HY000

  • Cause: A pseudo column or a proscribed function is used in the procedural statement. SQL pseudo columns such as LEVEL, ROWID, and ROWNUM can be used only in SQL statements. Similarly, some functions (such as DECODE, DUMP, and VSIZE) and SQL group functions (AVERAGE, MIN, MAX, COUNT, SUM, STDEV, and VARIANCE) can be used only in SQL statements.

  • Solution: Delete the pseudo column reference or function call statement from the procedural statement, or replace the procedural statement with the SELECT INTO statement. For example, replace bonus := DECODE(rating, 1, 5000, 2, 2500, ...); with SELECT 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 by using the %TYPE data 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

  • OceanBase error code: 9514

  • SQLSTATE: HY000

  • Cause: In a declaration, a variable without an initialization clause is automatically initialized into NULL, which is illogical for a NOT NULL variable. 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 9628

  • SQLSTATE: HY000

  • Cause: The prefix in a qualified name was a subprogram or cursor beyond an enclosing scope. That is, 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. 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

  • OceanBase error code: 9598

  • SQLSTATE: HY000

  • Cause: When the formal parameters of a subprogram were declared, one parameter was used to initialize another. 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

  • OceanBase error code: 9599

  • SQLSTATE: HY000

  • Cause: When the formal parameters of a procedure were declared, an OUT or IN-OUT parameter was initialized to a default value. Example: PROCEDURE calc_bonus (bonus OUT REAL := 0, ...) IS .... However, only the IN parameter 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

  • OceanBase error code: 9668

  • SQLSTATE: HY000

  • Cause: A prohibited function was used in an SQL statement. Certain functions such as SQLCODE and SQLERRM can 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 of SQLCODE and SQLERRM to local variables and then use the variables in the SQL statement, as in err_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

  • OceanBase error code: 9502

  • SQLSTATE: HY000

  • Cause: The actual parameter mode (OUT or IN/OUT) is not properly used in the USING clause. For the USING clause in the OPEN statement, only the IN mode is allowed.

  • Solution: Change the parameter mode in the USING clause to the correct mode.

PLS-00263: mismatch between string on a subprogram specification and body

  • OceanBase error code: 9602

  • SQLSTATE: HY000

  • Cause: An ACCESSIBLE BY clause was specified in a package body for an item with no equivalent clause in the package specification. In a package body, this clause can only be specified 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'

  • OceanBase error code: 9667

  • SQLSTATE: HY000

  • Cause: A GOTO statement 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

  • OceanBase error code: 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

  • OceanBase error code: 9520

  • SQLSTATE: HY000

  • Cause: The program package specification required for compiling the body of the program package cannot be found. The possible causes are as follows:

    • The name of the software package is misspelled.

    • The software package specification is never compiled.

    • The compiled software package specification cannot be accessed. The software package specification must be compiled before the body of the software package is compiled, and the compiler must have the privilege to access the compiled specification.

  • Solution:

    • Check the spelling of the software package name.

    • Compile the program package specification before you compile the body of the program package.

    • Ensure that the compiler can access the compiled specification.

PLS-00305: previous use of '%.*s' conflicts with this use

  • OceanBase error code: 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:

    1. Check the spelling of the cursor, procedure, function, or program package name.

    2. Check the names of all constants, variables, parameters, and exceptions declared in the same action scope.

    3. Delete or rename objects with duplicate names.

    4. 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'

  • OceanBase error code: 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 SQRT is called by using a misspelled name or a parameter with an incorrect data type.

  • Solution:

    • Check the spelling and declaration of the subprogram name.

    • Ensure that the subprogram call is correct.

    • Ensure that the parameters are of correct data types.

    • Ensure that the declaration is correctly placed in a block structure if the function is not a built-in function.

PLS-00307: too many declarations of '%.*s' match this call

  • OceanBase error code: 9544

  • SQLSTATE: HY000

  • Cause: The declaration of a subprogram or cursor name is ambiguous. This is because the declaration and call do not exactly match and multiple declarations match the call during the implicit conversion of parameter data types. The possible causes are as follows:

    • The subprogram or cursor name is misspelled.

    • The declaration is incorrect.

    • The declaration is not correctly placed in a block structure.

  • Solution:

    • Check the spelling and declaration of the subprogram or cursor name.

    • Ensure that the call is correct.

    • Ensure that the parameters are of correct data types.

    • Place the declaration properly in a block structure if the function is not a built-in function.

PLS-00310: with %%ROWTYPE attribute, '%.*s' must name a table, cursor or cursor-variable

  • OceanBase error code: 9586

  • SQLSTATE: HY000

  • Cause: The %ROWTYPE attribute must be applied to an identifier declared as a cursor, cursor variable, or database table. This error occurs when %ROWTYPE follows an identifier that has not been declared.

  • Solution: Change the declaration or do not apply the %ROWTYPE attribute 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

  • OceanBase error code: 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

  • OceanBase error code: 9610

  • SQLSTATE: HY000

  • Cause: A data type other than BINARY_INTEGER, PLS_INTEGER, or VARCHAR2 was specified in the INDEX BY clause 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 BY clause.

Note

This error code is introduced since OceanBase Database V4.0.0.

PLS-00316: PL/SQL TABLEs must use a single index

  • OceanBase error code: 9631

  • SQLSTATE: HY000

  • Cause: A composite primary key was specified in the INDEX BY clause 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 BY clause.

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

  • OceanBase error code: 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

  • OceanBase error code: 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_rec causes this exception because it references an undeclared cursor dept_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

  • OceanBase error code: 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 function SYSDATE cannot 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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 %TYPE and %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

  • OceanBase error code: 9595

  • SQLSTATE: HY000

  • Cause: Either a body (SELECT statement) 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 in CURSOR c1 RETURN emp%ROWTYPE;.

  • Solution: Add a SELECT statement 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

  • OceanBase error code: 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-OUT or OUT.

Note

This error code is introduced since OceanBase Database 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 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

  • OceanBase error code: 9550

  • SQLSTATE: HY000

  • Cause: A literal, constant, IN parameter, counter variable 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

  • OceanBase error code: 9684

  • SQLSTATE: HY000

  • Cause: A subtype defined as NOT NULL is used as the base type for another subtype defined as NULL. 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

  • OceanBase error code: 9592

  • SQLSTATE: HY000

  • Cause: A RAISE statement with no exception name followed was found outside an exception handler.

  • Solution: Delete the RAISE statement, 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

  • OceanBase error code: 9596

  • SQLSTATE: HY000

  • Cause: A construct in the WHEN excep1 OR OTHERS form was detected in the definition of an exception handler. The OTHERS handler must appear by itself as the last exception handler in a block.

  • Solution: Remove any identifier that appears with OTHERS or 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

  • OceanBase error code: 9591

  • SQLSTATE: HY000

  • Cause: One or more exception handlers are placed after an OTHERS handler. However, the OTHERS handler 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 OTHERS handler 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

  • OceanBase error code: 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

  • OceanBase error code: 5583

  • SQLSTATE: 42000

  • Cause: In a procedure, the RETURN statement contains an expression, which is not allowed.

  • Solution: Delete the expression from the RETURN statement, 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 EXIT or CONTINUE statement does not reference the LOOP statement. No label needs to be specified for the EXIT or CONTINUE statement. If a label (such as a label in EXIT my_label or CONTINUE my_label) is specified, the label must reference the LOOP statement.

  • Solution: Make sure that the label name is correctly spelled and the label references the LOOP statement.

PLS-00375: illegal GOTO statement; this GOTO cannot branch to label '%.*s'

  • OceanBase error code: 9505

  • SQLSTATE: HY000

  • Cause: The branch of the GOTO statement is a label from the outside of a construct (such as a loop or an exception handling program) that contains a statement sequence to the inside of the statement sequence. Such a branch is not allowed.

  • Solution: Move the GOTO statement 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

  • OceanBase error code: 9510

  • SQLSTATE: HY000

  • Cause: The EXIT or CONTINUE statement is found outside of a loop construct. The EXIT statement exits from the loop prematurely, and the CONTINUE statement is used to start the next iteration of the loop. The two statements must always appear in a loop.

  • Solution: Delete the EXIT or CONTINUE statement, or put them in a loop construct.

PLS-00382: expression is of wrong type

  • OceanBase error code: 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

  • OceanBase error code: 9590

  • SQLSTATE: HY000

  • Cause: An assignment target in the INTO list of a FETCH statement 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

  • OceanBase error code: 9660

  • SQLSTATE: HY000

  • Cause: The number of variables in the INTO clause of a FETCH statement does not match the number of columns in the cursor declaration.

  • Solution: Change the number of variables in the INTO clause 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

  • OceanBase error code: 9588

  • SQLSTATE: HY000

  • Cause: A cursor was declared with a SELECT statement that contains duplicate column names.

  • Solution: Use an alias to replace the duplicate column name in the select list.

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

  • OceanBase error code: 9665

  • SQLSTATE: HY000

  • Cause: The FETCH statement cannot assign a value to an assignment target in its INTO list because the target is not a variable that is legally formed and declared. For example, the FETCH 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

  • OceanBase error code: 9693

  • SQLSTATE: HY000

  • Cause: cursor_name in the CURRENT OF cursor_name clause was not declared in a FOR UPDATE clause.

  • Solution: Add a FOR UPDATE clause to the definition of the cursor or do not use the CURRENT OF cursor_name clause.

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

  • OceanBase error code: 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

  • OceanBase error code: 9692

  • SQLSTATE: HY000

  • Cause: The identifier in a CURRENT OF clause names an object not a cursor.

  • Solution: Check the spelling of the identifier. Make sure that the identifier names the cursor in the DELETE or UPDATE statement 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

  • OceanBase error code: 9618

  • SQLSTATE: HY000

  • Cause: The INTO clause was omitted in a SELECT INTO statement. For example, the code might look like SELECT deptno, dname, loc FROM dept WHERE ... instead of SELECT deptno, dname, loc INTO dept_rec FROM dept WHERE .... In PL/SQL, the INTO clause can be omitted only for a subquery.

  • Solution: Add the required INTO clause.

Note

This error code is introduced since OceanBase Database V4.0.0.

PLS-00430: FORALL iteration variable %.*s is not allowed in this context

  • OceanBase error code: 9612

  • SQLSTATE: HY000

  • Cause: You can use the FORALL iteration variable only as a subscript. In other words, you cannot use it directly or as a part of an expression.

  • Solution: Use the FORALL variable 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

  • OceanBase error code: 9614

  • SQLSTATE: HY000

  • Cause: The SELECT statement contains both the FORALL and BULK COLLECT INTO phrases.

  • Solution: Do not use FORALL and BULK COLLECT INTO together in a SELECT statement.

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

  • OceanBase error code: 9615

  • SQLSTATE: HY000

  • Cause: The DML statement (SELECT, INSERT, DELETE, or UPDATE) inside the FORALL statement does not contain the BULK IN-BIND variable.

  • Solution: Carry the BULK IN-BIND variable in the DML statement (SELECT, INSERT, DELETE, or UPDATE) inside the FORALL statement.

Note

This error code is introduced since OceanBase Database V4.0.0.

PLS-00438: value in LIMIT clause \'%.*s\' use is invalid

  • OceanBase error code: 9518

  • SQLSTATE: HY000

  • Cause: The numeric value type of the LIMIT clause behind FETCH INTO is incorrect. For example, the following statement is invalid because the LIMIT clause requires a numeric value: FETCH c1 BULK COLLECT INTO var_tab LIMIT 'aaaaa';

  • Solution: Modify the expression of the LIMIT clause so that it is followed by a numeric value. 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

  • Cause: A LIMIT clause is used within a non-bulk fetch.

  • Solution: Do not use a LIMIT clause 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

  • OceanBase error code: 9654

  • SQLSTATE: HY000

  • Cause: The specified name was not a label. An EXIT or CONTINUE statement 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 EXIT or CONTINUE statement. 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

  • OceanBase error code: 9619

  • SQLSTATE: HY000

  • Cause: You cannot call a packaged function from SQL statements unless its purity level is asserted by coding a RESTRICT_REFERENCES pragma 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

  • OceanBase error code: 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 OPEN statement.

  • 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

  • OceanBase error code: 9620

  • SQLSTATE: HY000

  • Cause: An expression of a wrong type is used in the USING or dynamic RETURNING clause. In the USING or dynamic RETURNING clause, 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

  • OceanBase error code: 5545

  • SQLSTATE: 42000

  • Cause: An identifier not declared as an exception appeared in the WHEN clause of an exception handler. Only an exception name is valid in a WHEN clause.

  • Solution: Check the spelling of the exception name to ensure that the exception was correctly declared.

PLS-00488: '%.*s' must be a type

  • OceanBase error code: 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 %TYPE attribute is not added to the declaration. For example, in DECLARE my_sal emp.sal%TYPE;my_ename emp.ename;, the %TYPE attribute is not declared.

    • To automatically provide the data type of a column when a constant or a variable is declared, the %TYPE attribute can be used.

    • To automatically provide the data type of a row when a record is declared, the %ROWTYPE attribute can be used.

  • Solution: Ensure that the data type descriptor designates a valid type. Use the %TYPE and %ROWTYPE attributes if necessary.

PLS-00491: numeric literal required

  • OceanBase error code: 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 of my_ename VARCHAR2(15);. When you specify the maximum length of a VARCHAR2 variable, you must use an integer 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

  • OceanBase error code: 9655

  • SQLSTATE: HY000

  • Cause: If a package spec p declares a function f, the function may not be used in any variable declarations in the same package specification. This error is caused by a circular instantiation problem: 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

  • OceanBase error code: 9639

  • SQLSTATE: HY000

  • Cause:

    • When a BULK syntax (such as BULK COLLECT INTO) is used to retrieve data, every variable in the INTO list must be of a type that is a collection of the type of the corresponding column.

    • When BULK is not used, every variable in the INTO list must be of a type compatible with the corresponding column.

  • Solution: Change the INTO list 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

  • OceanBase error code: 9634

  • SQLSTATE: HY000

  • Cause: A RETURN statement that contains no expression was used in a function body. In procedures, a RETURN statement contains no expression because the statement just returns control to the caller. However, in functions, a RETURN statement must contain an expression because its value is assigned to the function identifier.

  • Solution: Add an expression to the RETURN statement.

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

  • OceanBase error code: 9532

  • SQLSTATE: HY000

  • Cause: Parameters are declared for the MAP member function. The MAP member function can have only one parameter, which is the default SELF parameter. The MAP function cannot be declared as any parameter, and the SELF parameter is added by the compiler.

  • Solution: Delete the parameters from the MAP function.

PLS-00521: ORDER methods must be declared with 1 (one) parameter in addition to (optional) SELF

  • OceanBase error code: 9538

  • SQLSTATE: HY000

  • Cause: The ORDER function is declared without user-defined parameters. The ORDER function has two parameters, one of which is the default SELF parameter 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

  • OceanBase error code: 9531

  • SQLSTATE: HY000

  • Cause: The MAP member function is compiled in a way that it returns a value not of the scalar type.

  • Solution: Recompile the MAP function so that it returns a value of the scalar type.

PLS-00523: ORDER methods must return an INTEGER

  • OceanBase error code: 9533

  • SQLSTATE: HY000

  • Cause: The ORDER function returns a value not of the integer type.

  • Solution: Recompile the ORDER function 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

  • OceanBase error code: 9534

  • SQLSTATE: HY000

  • Cause: The ORDER function is declared without user-defined parameters. The ORDER function has two parameters, one of which is the default SELF parameter 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

  • OceanBase error code: 9535

  • SQLSTATE: HY000

  • Cause: The MAP or ORDER function is not provided for comparison. In this case, only equality comparison can be used.

  • Solution: Provide the MAP or ORDER function, or enable 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: In the PL code, the MAP or ORDER function is not defined for object comparison.

  • Solution: Define the MAP or ORDER function and retry.

PLS-00527: MAP or ORDER functions require a PRAGMA RESTRICT_REFERENCES specifying :WNDS,WNPS,RNPS,RNDS

  • OceanBase error code: 9536

  • SQLSTATE: HY000

  • Cause:

    • pragma restrict_references is not specified.

    • pragma restrict_references is specified but lacks any of the following parameters: WNDS, WNPS, RNPS, or RNDS.

  • Solution: Add or correct pragma, and then retry.

PLS-00528: The parameters to an ORDER function must have IN mode

  • OceanBase error code: 9537

  • SQLSTATE: HY000

  • Cause: The parameter of the ORDER function is declared to be in the OUT or IN OUT mode.

  • Solution: Declare the parameter to be in the IN mode.

PLS-00530: Illegal type used for object type attribute: '%.*s'

  • OceanBase error code: 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'

  • OceanBase error code: 9652

  • SQLSTATE: HY000

  • Cause: You are attempting to use an unsupported type in a VARRAY or TABLE type.

  • Solution: Use only supported types in a VARRAY or TABLE type.

Note

This error code is introduced since OceanBase Database V4.0.0.

PLS-00537: A VARRAY must have a positive limit

  • OceanBase error code: 9611

  • SQLSTATE: HY000

  • Cause: A VARRAY type was declared with a non-positive limit. 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 9608

  • SQLSTATE: HY000

  • Cause: The character set ANY_CS was 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

  • OceanBase error code: 9607

  • SQLSTATE: HY000

  • Cause: A LOB, DATE, BOOLEAN, ROWID, or MLSLABEL type was constrained with a length specification. 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

  • OceanBase error code: 9673

  • SQLSTATE: HY000

  • Cause: You are attempting to pass NULL to a parameter with the NOT NULL constraint.

  • Solution: Pass a NOT NULL expression to the parameter.

Note

This error code is introduced since OceanBase Database V4.0.0.

PLS-00572: improper constraint form used

  • OceanBase error code: 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

  • OceanBase error code: 9649

  • SQLSTATE: HY000

  • Cause: You are attempting to name a parameter SELF when declaring a static method. SELF is reserved as a parameter name in a method to hold the object instance on which the method is applied. A parameter named SELF is 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

  • OceanBase error code: 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'

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 9637

  • SQLSTATE: HY000

  • Cause: This exception is raised for the following errors:

    • The expression in the INTO clause of the OPEN or RETURNING statement is neither of legal SQL data types nor of the PL/SQL RECORD data type.

    • A collection of records is used in the INTO clause of the OPEN or RETURNING statement.

    • A record or a collection of records is used in BULK COLLECT INTO.

  • Solution: Use an expression of a correct data type in the INTO clause.

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

  • OceanBase error code: 9530

  • SQLSTATE: HY000

  • Cause: The SELF parameter is declared as an OUT parameter.

  • Solution: Declare the SELF parameter as an IN or IN OUT parameter.

PLS-00617: at least one result in the CASE expression must not be NULL

  • OceanBase error code: 9666

  • SQLSTATE: HY000

  • Cause: All the results in the CASE expression are NULL.

  • Solution: Change at least one result in the CASE expression 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

  • OceanBase error code: 9647

  • SQLSTATE: HY000

  • Cause: The first operand in the NULLIF expression is NULL.

  • Solution: Change the first operand in the NULLIF expression 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

  • OceanBase error code: 9648

  • SQLSTATE: HY000

  • Cause: All the 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

  • OceanBase error code: 9623

  • SQLSTATE: HY000

  • Cause: A PIPE statement was used in a non-pipelined function.

  • Solution: Use the PIPE statement 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

  • OceanBase error code: 9601

  • SQLSTATE: HY000

  • Cause: A pipelined function was specified with 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

  • OceanBase error code: 9635

  • SQLSTATE: HY000

  • Cause: A RETURN statement in a pipelined function contains an expression, which is not allowed. Pipelined functions must return values to the caller by using the PIPE statement.

  • Solution: Remove the expression from the RETURN statement and use a PIPE statement 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

  • OceanBase error code: 9589

  • SQLSTATE: HY000

  • Cause: A locally-defined (that is, not 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

  • OceanBase error code: 9633

  • SQLSTATE: HY000

  • Cause: You are attempting to create an aggregate function with either 0 arguments or more than 999 arguments.

  • Solution: Do not create aggregate functions with 0 arguments or more than 999 arguments.

Note

This error code is introduced since OceanBase Database V4.0.0.

PLS-00655: only functions can be declared as PIPELINED

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 9646

  • SQLSTATE: HY000

  • Cause: The return clause of the constructor method did not specify SELF AS RESULT.

  • Solution: Include RETURN SELF AS RESULT in the return clause.

Note

This error code is introduced since OceanBase Database 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 SELF parameter of the constructor was not IN OUT.

  • Solution: Change the mode of the SELF parameter to IN OUT.

Note

This error code is introduced since OceanBase Database 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 RETURN statement of the CONSTRUCTOR body.

  • Solution: Delete the expression from the RETURN statement.

PLS-00667: Element type of associative array should be pls_integer or binary_integer

  • OceanBase error code: 9617

  • SQLSTATE: HY000

  • Cause: You are attempting to specify an index collection whose element type was not pls_integer or binary_integer.

  • Solution: Change the index collection variable type to an associative array whose element type is pls_integer or binary_integer.

Note

This error code is introduced since OceanBase Database 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 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

  • OceanBase error code: 9613

  • SQLSTATE: HY000

  • Cause: The table(bulk_index).field form is the only field selection supported during runtime.

  • Solution: Use a FOR loop instead of the FORALL DML statement (MERGE, INSERT, DELETE, or UPDATE) 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 9629

  • SQLSTATE: HY000

  • Cause: The error code passed to the EXCEPTION_INIT pragma is out of range. The error code must be in the range of 1-9999 (excluding 100) or in the range of 20000-20999 for user-defined errors.

  • Solution: Use a valid error code.

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_INIT pragma is not a numeric literal (such as a variable). The second parameter must be a numeric literal in the range of 1-9999 (excluding 100). Error codes in the range of 20000-20999 indicate 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 named pragma was not declared in a package specification as required. For example, the pragma RESTRICT_REFERENCES must 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

  • OceanBase error code: 9632

  • SQLSTATE: HY000

  • Cause: The named pragma was declared in a package specification but not in the corresponding package body or vice-versa.

  • 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

  • OceanBase error code: 9509

  • SQLSTATE: HY000

  • Cause: The AUTONOMOUS_TRANSACTION pragma 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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 SELECT privilege, or when the ACCESS BY clause of the database object prohibits the attempted compilation.

  • Solution: Ask the DBA 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

  • OceanBase error code: 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

  • OceanBase error code: 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

  • OceanBase error code: 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 CURSOR type 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

  • OceanBase error code: 9624

  • SQLSTATE: HY000

  • Cause:

    • RESULT_CACHE does not support functions that contain the OUT or INOUT parameter.

    • RESULT_CACHE 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

    • RESULT_CACHE does not support functions in anonymous blocks.

    • RESULT_CACHE does not support pipelined functions and nested functions.

  • Solution: Remove the RESULT_CACHE used in the preceding unsupported scenarios.

Note

This error code is introduced since OceanBase Database V4.0.0.

Contact Us