Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Changing connection user

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-03-11 : 07:24:10
Coop writes "I'm building a website that will use sql server 2000 as the back end. I would like to know if i set up the DSN to login in as the dba from the website, how can i make the connection appear as the logged in user for a given request. So if user A requests a page I would like the user_name() function appear to be user A not the dba that the DSN uses. All of my security {username tables} auth the user, not domain or windows accounts.

Thanks,
Coop"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-03-11 : 07:27:03
If you really want to be able to do this via user_name(), then you either need to use Windows authentication, or create SQL Server login accounts for each user, and use those to connect instead of a common login. If you don't, you'll have to have the application pass the user name as a value each time it requests something from SQL Server. DO NOT use "sa" as an application login.

Go to Top of Page
   

- Advertisement -