Bren
Bren

Reputation: 2214

How to create a dummy Oracle Server to connect with Toad

I am interested in creating a module which accepts TCP connections and handles OCI calls made from db tools like Toad, or PL/SQL Developer.

My aim is to manipulate data before sending it to client, hide some stuff etc. Is it possible to do something like that ?

More specifically, we created a data migration tool coded in java. If i can get calls from a db tool and call the tool's methods using JNI, i achive what i am intended to do. As far as i know there is no api to create a OCI server to connect.

Upvotes: 0

Views: 1489

Answers (1)

Edwin Buck
Edwin Buck

Reputation: 70949

First decide if you are binding to oci or jdbc. The solutions are very different depending on the technology.

Second, keep in mind that while you simply "connect" to a socket, the oci or jdbc protocol is going to request data according to it's protocol. In other words, it is not enough to quickly create an OCI server, you need to have code to actually respond to the requests.

The simplest way of doing that is to actually use a database, but one with a different configuration. The only other way to do that is to write something that simulates a database. With enough simulation, you actually find that you are moving closer to implementing a database.

Perhaps it would be much easier to find a small, compact database like HSQLDB to actually provide a database for your testing via TOAD; however, it will be a different database (which may introduce other issues) it won't support oci (only Oracle supports the Oracle Call Interface) and odds are you will eventually have to test against a live Oracle database anyway.

Upvotes: 1

Related Questions