Toad World® Forums

Testing over 2 databases


A user sent me this question:

When writing new packages we quite oftern write from onedatabase (our web one) to another (our production one) with the procedurestored on the first.

Unless I am mistaken I am unable to fully test across 2databases. I am able to check updatestatements using a link but cannot check for inserts as there is no way ofselecting another database to select a table from the outcomes and I am unableto find a method round this.

Please can you confirm if my assumption is correct or ifI am wrong, please point me in the relevant guide.


While you cannot inside Code Tester test programs in another instance, you can certainly test the contents of a table in another instance.

It is true that you cannot use our lookup windows to change the instance and pick the table name from a list.

But you can simply type in the name of the table in your outcome Properties Window, as in:


The generated test code will query from this remote table; no problem!



Hi Steven,

I followed your this method to do test on two databases, but it doesn’t work.

I need to do a test which the procedure append the data saved in database 1 to database 2. In outcome properties, Like what you wrote :ABC.XYZ@my_db_link, I set ABC with the schema name , and XYZ the table name on database 2. for my_db_link, I gave the full link of database 2, but it automatically truncated to only the name of database 2. And a warning message displayed that the string " XYZ.ABC@my_db_link" I set doesn’t identify a table that can be used in current schema.

I don’t know what’s wrong I understand here. Could you provide any suggestions?


I just created a test definition with an outcome that compared a query of this form:

select * from table_name*dblink

to a table set to:


The test compiled and ran properly.

I think that perhaps your syntax is wrong, or you are trying to do something else that reveals a bug.

Please create a support bundle via Help -> Send Support Bundle, and send it to me at

Thanks, SF


It still doesn’t work. I send you the support bundle file.



Thanks, Yanyin.

Before we go any further with Code Tester, have you verified that this DBlink works in, say, Toad or SQL*Plus?

In other words, you should be able to connect in Toad as the same schema you connect to in CT and execute this query:

select count(*) from

or whichever dblink you have defined.

If you cannot get it to work in Toad, you cannot expect it to work in CT. Please verify that it works. If so, then it certainly should work in CT – and certainly it should not truncate what you enter!

Thanks, SF


Thanks SF, the problem has been solved. The CT works well.

Sorry for my late reply. :slight_smile:



Very glad to hear of it!