Unix Technical Forum

Change servername based on logon server

This is a discussion on Change servername based on logon server within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Hi We are to use an application on two replicated sites, the application uses a user dsn. We propose ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 10:10 PM
Ben
 
Posts: n/a
Default Change servername based on logon server

Hi

We are to use an application on two replicated sites, the application uses a
user dsn.

We propose to use a reg file attached to a logon script to amend the server
name so that users with laptops can move transparently between sites.

Is this the best method or is there another?

Thanks
B


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 10:10 PM
Mike C#
 
Posts: n/a
Default Re: Change servername based on logon server

A registry file? Sounds dangerous.

"Ben" <Ben@Newsgroups.microsoft.com> wrote in message
news:OoEZPKocGHA.1324@TK2MSFTNGP04.phx.gbl...
> Hi
>
> We are to use an application on two replicated sites, the application uses
> a
> user dsn.
>
> We propose to use a reg file attached to a logon script to amend the
> server
> name so that users with laptops can move transparently between sites.
>
> Is this the best method or is there another?
>
> Thanks
> B
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 10:11 PM
Ben
 
Posts: n/a
Default Re: Change servername based on logon server

Hi

Yes the server name is stored in the HKCU.

We use reg files regularly to update other required settings to the HKCU.

But is there a reccomended method?

Thanks

B

"Mike C#" <xxx@yyy.com> wrote in message news:tAR8g.506$Ut2.358@fe09.lga...
> A registry file? Sounds dangerous.
>
> "Ben" <Ben@Newsgroups.microsoft.com> wrote in message
> news:OoEZPKocGHA.1324@TK2MSFTNGP04.phx.gbl...
> > Hi
> >
> > We are to use an application on two replicated sites, the application

uses
> > a
> > user dsn.
> >
> > We propose to use a reg file attached to a logon script to amend the
> > server
> > name so that users with laptops can move transparently between sites.
> >
> > Is this the best method or is there another?
> >
> > Thanks
> > B
> >
> >

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 10:11 PM
Mike C#
 
Posts: n/a
Default Re: Change servername based on logon server

That's probably the easiest method, but it would be really easy for some to
alter the reg files and screw up a registry pretty badly. For constantly
changing servers, maybe a File DSN would be a more secure bet? For security
purposes, if you want to mess directly with the registry, maybe adding a
short application to the logon script that only touches the registry keys
you really want to change would be a more secure bet? I'd just be a little
hesitant about installing nondescriminating reg files on user computers.

"Ben" <Ben@Newsgroups.microsoft.com> wrote in message
news:eLjhcPtdGHA.3364@TK2MSFTNGP05.phx.gbl...
> Hi
>
> Yes the server name is stored in the HKCU.
>
> We use reg files regularly to update other required settings to the HKCU.
>
> But is there a reccomended method?
>
> Thanks
>
> B
>
> "Mike C#" <xxx@yyy.com> wrote in message
> news:tAR8g.506$Ut2.358@fe09.lga...
>> A registry file? Sounds dangerous.
>>
>> "Ben" <Ben@Newsgroups.microsoft.com> wrote in message
>> news:OoEZPKocGHA.1324@TK2MSFTNGP04.phx.gbl...
>> > Hi
>> >
>> > We are to use an application on two replicated sites, the application

> uses
>> > a
>> > user dsn.
>> >
>> > We propose to use a reg file attached to a logon script to amend the
>> > server
>> > name so that users with laptops can move transparently between sites.
>> >
>> > Is this the best method or is there another?
>> >
>> > Thanks
>> > B
>> >
>> >

>>
>>

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 10:11 PM
Ben
 
Posts: n/a
Default Re: Change servername based on logon server

Hi Mike,

Thanks for your post, and sorry for the delay in replying, sadly our
Software Vendor only Supports User and System DSNs.

The logon script / reg file is in a secure location on the server where
users do not have write access, it will run on each boot so if the user
messes with the registry: after a boot we are sorted again. Thankfully I
think they all have not even heard of a registry let alone know how to open
regedit :-)

Thanks
B

"Mike C#" <xxx@yyy.com> wrote in message news:C7t9g.164$yJ6.58@fe12.lga...
> That's probably the easiest method, but it would be really easy for some

to
> alter the reg files and screw up a registry pretty badly. For constantly
> changing servers, maybe a File DSN would be a more secure bet? For

security
> purposes, if you want to mess directly with the registry, maybe adding a
> short application to the logon script that only touches the registry keys
> you really want to change would be a more secure bet? I'd just be a

little
> hesitant about installing nondescriminating reg files on user computers.
>
> "Ben" <Ben@Newsgroups.microsoft.com> wrote in message
> news:eLjhcPtdGHA.3364@TK2MSFTNGP05.phx.gbl...
> > Hi
> >
> > Yes the server name is stored in the HKCU.
> >
> > We use reg files regularly to update other required settings to the

HKCU.
> >
> > But is there a reccomended method?
> >
> > Thanks
> >
> > B
> >
> > "Mike C#" <xxx@yyy.com> wrote in message
> > news:tAR8g.506$Ut2.358@fe09.lga...
> >> A registry file? Sounds dangerous.
> >>
> >> "Ben" <Ben@Newsgroups.microsoft.com> wrote in message
> >> news:OoEZPKocGHA.1324@TK2MSFTNGP04.phx.gbl...
> >> > Hi
> >> >
> >> > We are to use an application on two replicated sites, the application

> > uses
> >> > a
> >> > user dsn.
> >> >
> >> > We propose to use a reg file attached to a logon script to amend the
> >> > server
> >> > name so that users with laptops can move transparently between sites.
> >> >
> >> > Is this the best method or is there another?
> >> >
> >> > Thanks
> >> > B
> >> >
> >> >
> >>
> >>

> >
> >

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-27-2008, 10:11 PM
Mike C#
 
Posts: n/a
Default Re: Change servername based on logon server

Hi Ben,

I'd still be concerned that the registry file could be altered at some point
before being installed on the system (a disgruntled IT employee? hacker?
curious employee? who knows...) Of course that's just my initial thoughts,
but I'd be hesitant to send .reg files to be directly imported into the
registry. Personally I prefer the idea of some form of small validating
application called from the script to ensure direct registry updates are
within a very well-defined and narrow scope. In fact, since you're doing
DSNs, I might even go a step further and suggest using the ODBC API to
update them instead of writing the registry directly. Presumably the ODBC
API offers additional validation of the DSN as well (i.e., length of DSN
name, etc.)

Anyway, best of luck!

Mike



"Ben" <Ben@Newsgroups.microsoft.com> wrote in message
news:OURbJ2qfGHA.4864@TK2MSFTNGP05.phx.gbl...
> Hi Mike,
>
> Thanks for your post, and sorry for the delay in replying, sadly our
> Software Vendor only Supports User and System DSNs.
>
> The logon script / reg file is in a secure location on the server where
> users do not have write access, it will run on each boot so if the user
> messes with the registry: after a boot we are sorted again. Thankfully I
> think they all have not even heard of a registry let alone know how to
> open
> regedit :-)
>
> Thanks
> B
>
> "Mike C#" <xxx@yyy.com> wrote in message news:C7t9g.164$yJ6.58@fe12.lga...
>> That's probably the easiest method, but it would be really easy for some

> to
>> alter the reg files and screw up a registry pretty badly. For constantly
>> changing servers, maybe a File DSN would be a more secure bet? For

> security
>> purposes, if you want to mess directly with the registry, maybe adding a
>> short application to the logon script that only touches the registry keys
>> you really want to change would be a more secure bet? I'd just be a

> little
>> hesitant about installing nondescriminating reg files on user computers.
>>
>> "Ben" <Ben@Newsgroups.microsoft.com> wrote in message
>> news:eLjhcPtdGHA.3364@TK2MSFTNGP05.phx.gbl...
>> > Hi
>> >
>> > Yes the server name is stored in the HKCU.
>> >
>> > We use reg files regularly to update other required settings to the

> HKCU.
>> >
>> > But is there a reccomended method?
>> >
>> > Thanks
>> >
>> > B
>> >
>> > "Mike C#" <xxx@yyy.com> wrote in message
>> > news:tAR8g.506$Ut2.358@fe09.lga...
>> >> A registry file? Sounds dangerous.
>> >>
>> >> "Ben" <Ben@Newsgroups.microsoft.com> wrote in message
>> >> news:OoEZPKocGHA.1324@TK2MSFTNGP04.phx.gbl...
>> >> > Hi
>> >> >
>> >> > We are to use an application on two replicated sites, the
>> >> > application
>> > uses
>> >> > a
>> >> > user dsn.
>> >> >
>> >> > We propose to use a reg file attached to a logon script to amend the
>> >> > server
>> >> > name so that users with laptops can move transparently between
>> >> > sites.
>> >> >
>> >> > Is this the best method or is there another?
>> >> >
>> >> > Thanks
>> >> > B
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >

>>
>>

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 03:09 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com