I'm having issues with of my stored procs and an Add Duplicate Row test. It counts the table before and after the SP. The test just inserts some values into the table and the outcome, I check to see if the count is > 0. I am the owner of the object I'm testing. QCTO was set up using our prod account and the code I'm testing is using the prod_report account. I'm logged into as prod_report account.
I create the test without any problems, but when i click Generate Test Code on the dashboard I get the error:
********************************************************
Oracle Error General
Error code : 10000002
Error name : UNANTICIPATED-ERROR
Error details :
Execute DDL statements dynamic SQL failure
An unanticipated error has occurred. Please review the information below and see if it will help you resolve the problem.
CODE-EXECUTED =
ERROR-INFO =
ORA-06512: at line 2
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1204
ORA-06512: at "SYS.DBMS_SQL", line 323
ORA-06512: at "RF3_PROD_1.QU_TEST", line 157
********************************************************
Oracle Error Advanced
System error code : -1031
System error message :
ORA-01031: insufficient privileges
Error stack :
ORA-06512: at line 2
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1204
ORA-06512: at "SYS.DBMS_SQL", line 323
ORA-06512: at "RF3_PROD_1.QU_TEST", line 157
Oracle is raising a -1031 (insufficient privs) error on this block:
BEGIN /* NOTE: Explicit CREATE/DROP TYPE privileges required for this code to work. */
BEGIN
EXECUTE IMMEDIATE 'DROP TYPE RF_PRODREPORT.Q##123456789_qot FORCE';
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
BEGIN
EXECUTE IMMEDIATE 'DROP TYPE RF_PRODREPORT.Q##123456789_qot FORCE';
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE RF_PRODREPORT.Q##123456789_qot IS OBJECT ....;';
EXECUTE IMMEDIATE 'CREATE OR REPLACE TYPE RF_PRODREPORT.Q##123456789_qot IS TABLE OF RF_PRODREPORT.Q##123456789_qot ';
END;
This is code that is generated for use with data set comparisons and the schema your working on needs to have the privileges to drop and create types.
RESOLUTION:
Give privileges to drop and create types to that schema you're running the test from.
STATUS:
Enhancement request ST64391 has been submitted to development for consideration in a future release of Quest Code Tester.
ER is to have QCTO check that the necessary privileges are present first and give a more detailed warning.
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center