SQL Server Performance Forum – Threads Archive
Using an ALIAS
A few years back we had an application that would connect using a OLEDB connection string, using the same login. Yet in that connection string we trapped the machine name and passed that along to use as an alias.. So in our example. We have hundreds of users that all authenticate using "App" as the login name. I want to change that so our intranet ap will authenticate using IIS still by using app, but to authenticate to SQL it will pass the machine name(not username) to SQL.. Has anyone done this, and what are the valid parameters in a OLEDB login string..? -David -David RoeschSan Diego, Ca
Interesting approach. May I ask why you have chosen to authenticate based on a machine instead of a user? And how did you look up the machine name before? Did you do a connection with "App", then read the connection properties to get the workstation ID and then you reconnected with that as login name? Anyway, in ASP you need to use Request.ServerVariables("REMOTE_HOST"). This will only give you IP address by default though. You need to configure IIS to perform a reverse DNS lookup to get the machine name. This works best in intranet scenarios and isn’t good for sites with heavy traffic. See the article below on how to enable it in IIS: HOWTO: Configure REMOTE_HOST to Perform a Reverse DNS Lookup in IIS
http://support.microsoft.com/default.aspx?scid=kb;EN-US;245574 Your DNS servers need to be configured to do reverse lookups (IP to name) for this to work. Edit:
About the format for an OLEDB string check outhttp://www.connectionstrings.com . Do a standard OLEDB connection and then loop trough your connection properties and print them out to see all parameters. /Argyle
Hi, <img src=’/community/emoticons/emotion-1.gif’ alt=’

I see. Yes the article covers what you need to do. Using REMOTE_HOST is the only way for IIS to identify a remote machine name. /Argyle
]]>