Toad World® Forums

What should I do when I have a schema with the same name as a table?


This question was sent to me by a user:

Unfortunately we have user “bank” and table with public synonym with the same name. All object which we are using by our customers (banks like Hypo bank, Volks banks, …) are owned by that user, so we can not change the name of user. The same goes for table “bank” with public synonym “bank” which is the most frequent object used in our software. So we can not change name of synonym either. We have managed to use your software with other user " SALTER" and make test cases of objects of user “bank”.

1.) Problem we still have is wrong call of package procedure mypack.myproc in let say q##mypack, this package is generated with qu_generate package. We have changed you package by commenting the first part of the line of “l_harness.program_owner || ‘.’ || l_exec_prog_name”.

Instead of call bank.mypack.myproc now qu_generate generates call mypack.myproc.

2.) Same reason we probably get error by importing of any object owned by “bank”. Import error for all object of user “bank” is this:

Violation of unique index “UN_QU_HRN_NAME”

We tried to insert or update a row of data, and ran into the following problem: at least one of the values are already in the database and you are not allowed to have duplicates.

This error occurred on the table named QU_HARNESS, which is owned by QUESTCODETESTER. The name of this unique constraint is UN_QU_HRN_NAME. In some cases, we may be able to also display the columns and values that triggered the conflict. If available, they follow below.


NAME = Q## mypack



We have noticed this before and, quite honestly, it is something of a bug in Oracle - the compiler seems to get confused.

Having said that, we will take a look at what we need to change in our backend code to avoid these errors. I have logged this as a bug. Since we are just releasing 1.6.1, however, I don’t think we will see a fix for this one very soon.

Regards, SF