Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Rewriting sql queries depending on the source ip address

Re: Rewriting sql queries depending on the source ip address

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Sat, 12 Jul 2003 10:49:10 +0200
Message-ID: <37hvgvkq9u70gf8b5uo4i74cjvq9isun55@4ax.com>


On 12 Jul 2003 00:15:20 -0700, af_inet_at_web.de (Chris Lever) wrote:

>Hello,
>
>I have 10 client machines which connect to 10 seperate Oracle servers.
>The name of the database on each server is db1. Now these Oracle
>servers should be consolidated and only one server for all databases
>should be used. But the database names in the clients are hardcoded.
>So i need a way to rewrite these database names dependending on the
>source ip address of the sql-query.
>
>client1.company.com wants to use db1 -> connect to db1 on new server
>client2.company.com wants to use db1 -> connect to db2 on new server
>client3.company.com wants to use db1 -> connect to db3 on new server
>
>Does anybody know a tool which can do this?
>
>Thanks for your interest,
>Chris

Why don't you merge the affected schemas in one database? Now you are going to try to hit a nail with a sledgehammer and you will get hurt yourself. You could easily set up synonyms to make sure the clients get into the correct schema. Other than you would need dynamic sql for *all* your queries: and as they are running on one server you don't even want to consider that.
In short: I urgently ask you to reconsider, to avoid you end up in a real mess.

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Sat Jul 12 2003 - 03:49:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US