utPLSQL icon indicating copy to clipboard operation
utPLSQL copied to clipboard

ORA-44004: invalid qualified SQL name

Open DiegoMi opened this issue 3 years ago • 2 comments

Hello, we are getting this error whenever we try to run tests from a schema which has a name starting with a number. We have created a package PKG1 on a schema with name 01234567A (these names are only as example). We have created a test package PKG1_TEST in that schema too. When we try to execute ut.run(); we get this output:

ORA-06512: at "SYS.DBMS_ASSERT", line 315
ORA-06512: at "UTP3.UT_UTILS", line 899
ORA-06512: at "UTP3.UT_ANNOTATION_MANAGER", line 73
ORA-06512: at "UTP3.UT_ANNOTATION_MANAGER", line 188
ORA-06512: at "UTP3.UT_ANNOTATION_MANAGER", line 314
ORA-06512: at "UTP3.UT_SUITE_MANAGER", line 432
ORA-06512: at "UTP3.UT_SUITE_MANAGER", line 455
ORA-06512: at "UTP3.UT_SUITE_MANAGER", line 552
ORA-06512: at "UTP3.UT_RUNNER", line 139

ORA-44004: invalid qualified SQL name

If we try another schema, let's say X0123456A, tests run fine.

Our version of utplsql is 3.1.12, installed in its own schema utp3, and oracle version is Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production.

Thanks for your help.

DiegoMi avatar May 19 '22 10:05 DiegoMi

So your schema names are actually created as quoted identifiers. You cannot do select * from 12345ABC.SOME_TABLE; You have to do: select * from "12345ABC".SOME_TABLE;

Currenyly utPLSQL does not support quoted identifiers.

As a workaround, you could try this:

alter session set current_schema=12345ABC;
ut.run('test_pkg1');

jgebal avatar May 19 '22 11:05 jgebal

@DiegoMi Does that work for you?

jgebal avatar May 24 '22 08:05 jgebal