Category Archives: SQL Database Error Messages

SQL-02147: ANSI Dynamic occurrence value out of range

oracle

SQL-02147: ANSI Dynamic occurrence value out of range
Cause: The value clause in a dynamic GET or SET statement is less than one or greater than MAX given for descriptor allocation
Action: Supply a number for the VALUE clause between 1 and the MAX occurrences supplied when the descriptor was allocated

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02146: Attempt to allocate an existing descriptor

oracle

SQL-02146: Attempt to allocate an existing descriptor
Cause: An attempt allocated a descriptor which has previously been allocated was encountered
Action: Use and unique descriptor name or deallocate the descriptor before attempting to reallocate it

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02145: Invalid dynamic descriptor

oracle

SQL-02145: Invalid dynamic descriptor
Cause: An attempt to access an unallocated or invalid descriptor was encountered
Action: For ANSI descriptors, check that descriptor name is valid and descriptor has been allocated and not previously deallocated. Or if using Oracle descriptors (sqlda) with mode=ansi also use dynamic=oracle

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02144: Invalid ANSI dynamic usage

oracle

SQL-02144: Invalid ANSI dynamic usage
Cause: An ANSI allocate, deallocate, get or set descriptor statement was encountered when dynamic option was not set
Action: Precompile your source with option dynamic=ansi

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02143: Target object has not been properly allocated

oracle

SQL-02143: Target object has not been properly allocated
Cause: An attempt was made to retrieve elements from a collection into an unallocated object pointer
Action: Allocate the object pointer with the EXEC SQL ALLOCATE statement

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02142: Collection is NULL

oracle

SQL-02142: Collection is NULL
Cause: The collection referenced in an EXEC SQL COLLECTION statement is null
Action: Check the status of the associated indicator variable prior to executing an EXEC SQL COLLECTION statement

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02141: Collection descriptor has not been allocated

oracle

SQL-02141: Collection descriptor has not been allocated
Cause: An unallocated collection descriptor was referenced in a COLLECTION SET or COLLECTION GET statement
Action: Allocate the collection descriptor with the EXEC SQL ALLOCATE statement. e.g. EXEC SQL ALLOCATE :coldesc_p

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02140: An unnamed connection already exists

oracle

SQL-02140: An unnamed connection already exists
Cause: An attempt to register an external procedure context was made when an unnamed connection already exists for the runtime context
Action: Do not attempt to establish any connections with the EXEC SQL CONNECT statement from external procedures

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02139: Unable to get the OCI handles

oracle

SQL-02139: Unable to get the OCI handles
Cause: The call to OCIExtProcGetEnv failed
Action: Ensure that the OCIExtProcContext that the external procedure has been created with a CONTEXT parameter and that this context is correctly referenced in the EXEC SQL REGISTER CONNECT statement

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/

SQL-02138: No external procedure context exists

oracle

SQL-02138: No external procedure context exists
Cause: The external procedure context passed in the EXEC SQL REGISTER CONNECT statement is not valid
Action: Ensure that you have done the following: 

1. Created the PL/SQL procedure/function with a CONTEXT parameter 

2. Included OCIExtProcContext in the formal parameter list of the external procedure 

3. Correctly passed the OCIExtProcContext to the EXEC SQL REGISTER CONNECT statement

Back to previous menu

https://support.oracle.com/

http://www.oracle.com/