inicio mail me! sindicaci;ón

Intercepting connections

 

Hello,

You help is very much appreciated.

I have an Intranet environment that contains tens of apps that use a specific database.

I want to create an Intranet test environment (which will use a test database), by basically copying the existing Intranet environment to a new location.

* I cannot change the connection strings in the applications level since each app stores it differently (some store it in Web.Config, some hard coded, etc….).

 

 

Then, have a layer that sits between the Intranet Apps and SQL SERVER (or inside SQL SERVER itself), that will intercept the connections requests.
Once intercepted, the code will check if the connection request comes from Intranet Test environemnt, and if so, change the connection string on the fly to point to the test database.



The question:

Is there a way in SQL SERVER 2005, to intercept connections, and then, based on the application that requested the connection, modify the connection on the fly (so that if the calling app is from test_Intranet – intercept the connection and change it to point to a test database, otherwise leave the connection as it is (live database).

 

Thank you,

Roy

Report Abuse

14 May 2008, 1:52 AM UTC

Anton Klimov - MSFT

These stars recognize your participation in the forums. For more information about the different levels of stars, and how points are earned, please see the FAQ.

src="/IE16/images/stars2.png" />

Moderator

Posts 270

Re: Intercepting connections

Comment

Was this post helpful ?

Reply

Quote

You said that you had a number of applications each doing its own thing.
Application most likely process all the connection strings locally, and might not even have connection strings as such, and instead migh have server names and separate properties. In this case each application will use the corresponding network protocol to connect to the server.
I guess it might be possible to do some tcp port redirection but I’m not sure what can be done about named pipes. Perhaps others can comment on that.

If I understand you correctly you have a specific intranet configuration. Is it possible for you to have something like a private network segment and install a SQL Server with the same name and test database for this segment only?

Bookmark:Digg Del.icio.us Reddit

Leave a Comment