tags:

views:

66

answers:

5

I've faced a bit strange problem. There is a site client would like to duplicate on another domain name. Site is built on ASP(yes, old v1 ASP :( ) with SQLServer. Problem is that all the database operations, including connection information is compiled into a DLL library.

Is there a way to some how intercept, override or workaround this?

Platform:

  • Windows 2000 Server
  • SQLServer 7
  • ASP v1 (VisualBasic)
+3  A: 

What a nightmare...

If you have control over the new database server, and the connection string references the database server by name, you could add a line in the hosts file which points the name of the old server to a new ip address. Then you still have to create a user with the same password on the new database server.

Philippe Leybaert
DNS redirection. That's almost like doing a man-in-the-middle, but legally!
Pierre-Alain Vigeant
Thanks guys, good idea. I however hoped to do it on the same server. Will keep this option as a last resort though!
Alex N.
Then point the DNS back to the same machine?
KeeperOfTheSoul
A: 

Do you have any configuration options at all from asp? Even dbname or the such? If so you might be able to use two separate servers for IIS and use a single db server. I'm afraid you might need to find the source or the guy who wrote it.

If you could figure out the connection string or DNS you might be able to do something.

You could write your own passthrough ODBC provider.

Toby Allen
+1  A: 

Yes! However, your new database name MUST be smaller or equal to the length of your old one. Simply open up the vb6 .dll in any Hex Editor and search and replace. Make SURE you do not change the length of the DLL or shift any bytes around.

Failing that, add a hosts entry to windows to redirect the connection.

hova
A: 

Could it be that the application uses a DSN definition for the connection?

In Control Panel -> Administrative Tools open ODBC Data Source Administrator. Have a look at the System DSN tab. Does there seem to be anything listed there that is related to the application?

AnthonyWJones
A: 

Before you hack your DNS or rename the server, be aware that the SQL Server client supports aliases specifically for this scenario: How to: Create a Server Alias for Use by a Client.

The SQL 2000 tool for configuring an alias is the Client Network Utility.

Remus Rusanu