Testing an SQL query in Oracle that includes a remote database

Our development databases (Oracle 9i) use the remote database link for the remote shared database.

This decision was made many years ago when it was impractical to place some database schemas on the development machine — they were too large.

We have specific schemas on development machines, and we make remote schemas local using Oracle database links, as well as some synonyms on development machines.

The problem is that I would like to test the part of SQL that joins the tables in the schemas on both sides of the database link.

eg. (simplified case):

   select a.col, b.col
   from a, b
   where a.b_id = b.id
  • a is in the local database
  • b is in the delete database
  • DB, 'b' b @remotedb.

- . ( , , Oracle, ).

- , - - .

- unit test , ?

, SQL-, .

0
4

, , , . , . , , , , . , , , , , . , .

+4

.

, :

  • SQL ( )

" ", , , ( ).

, b . , , , .

, ( ) unit test. , , .

[EDIT] , . , . , (, , ) .

, ( - " - " ). , .

+2

. , .

0

, . . , . /, , ( db ). , ).

, , , / (.. , , ), , " " , + .

- , , , "" ( / ) - sys admin : " ?" )

If you are trying to go back in time and test already implemented blocks, then why bother? If they were in production for some time without any incidents, I would say that everything is in order. However, there is always the possibility that your block / request may have a “slow time ticking” effect on the side (cumulative effect over time). Well, analyze the impact - this is the answer.

0
source

All Articles