vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| If I specify an IP address in my connection string, after the connection is made setnet32 has been changed to use that hostname instead of the default. Is this is what's intended? Our environment is such our production and test servers have the same name, but are on different machines. This lets the development staff use one hosts file and the production users use another. I'm writing an app which attempts to compare database tables for verification between the test and production environments. So I would want to connect to servername@10.0.0.1 and servername@10.0.0.2 at the same time; but this seems impossible. Is there a way to NOT update the registry/setnet as a sideeffect of connecting with an alternate hostname? |
| |||
| On Aug 30, 10:54 am, hometoast <hometo...@gmail.com> wrote: > If I specify an IP address in my connection string, after the > connection is made setnet32 has been changed to use that hostname > instead of the default. > > Is this is what's intended? > > Our environment is such our production and test servers have the same > name, but are on different machines. This lets the development staff > use one hosts file and the production users use another. I'm writing > an app which attempts to compare database tables for verification > between the test and production environments. So I would want to > connect to servern...@10.0.0.1 and servern...@10.0.0.2 at the same > time; but this seems impossible. > > Is there a way to NOT update the registry/setnet as a sideeffect of > connecting with an alternate hostname? That's the first mistake. You should NEVER have two server instances with the same name on different machines. Environment variables, ODBC tags, and other mechanisms were developed for allowing your applications to know have to know the server''s name at compile time but to either determine the servername at runtime or to just connect to a default server. Fix that and things get easier. I think that you are the third person this month to have a similar problem with the same cause. Art S. Kagel |
| ||||
| Thanks. I got the same answer from a friend via email. I guess I'll just have to deal --- I'm not in the position to get a government agency's system changed that much. On Aug 30, 6:24 pm, "Art S. Kagel" <art.ka...@gmail.com> wrote: > On Aug 30, 10:54 am, hometoast <hometo...@gmail.com> wrote: > > > > > If I specify an IP address in my connection string, after the > > connection is made setnet32 has been changed to use that hostname > > instead of the default. > > > Is this is what's intended? > > > Our environment is such our production and test servers have the same > > name, but are on different machines. This lets the development staff > > use one hosts file and the production users use another. I'm writing > > an app which attempts to compare database tables for verification > > between the test and production environments. So I would want to > > connect to servern...@10.0.0.1 and servern...@10.0.0.2 at the same > > time; but this seems impossible. > > > Is there a way to NOT update the registry/setnet as a sideeffect of > > connecting with an alternate hostname? > > That's the first mistake. You should NEVER have two server instances > with the same name on different machines. Environment variables, ODBC > tags, and other mechanisms were developed for allowing your > applications to know have to know the server''s name at compile time > but to either determine the servername at runtime or to just connect > to a default server. Fix that and things get easier. I think that > you are the third person this month to have a similar problem with the > same cause. > > Art S. Kagel |