August 25, 2011 at 10:07 am
I have the following sql server data access questions:
1. I would like users to sign on to sql server using group roles by using sql authenication. However, I would like sql server to know who the individual users are are so I can keep an audit trail of changes made to the various database tables. Can you tell me if this is possibly and point me to a reference I can use to see how to code this request?
2. Can sql server 2008 use the active directory? If so, can you point me to a reference that shows how to accomplish this task?
August 25, 2011 at 12:51 pm
wendy elizabeth (8/25/2011)
I have the following sql server data access questions:1. I would like users to sign on to sql server using group roles by using sql auauthenticationHowever, I would like sql server to know who the individual users are are so I can keep an audit trail of changes made to the various database tables. Can you tell me if this is possibly and point me to a reference I can use to see how to code this request?
Sort of-ish. You cant log in via a sql group role so you would need to create a sql login specfispecificet them login in via trusted login and then get them to use an application role login.
If you come across the system stored procedure sp_who2 then you will see what sort of info you can easily get to. If you need the code then run from any database sp_helptext 'sp_who2'
As you will see the machine and appname etc.
What is the end goal?
August 25, 2011 at 1:51 pm
You can use the system_user function to get the login name if Windows authentication was used. To have an application use Windows authentication just set integrated authentication in the connection string. If you're trying to have a SQL login used to connect to SQL and then authenticate to the domain after that I'm sure there's some way to do it but it may be easier to pursue other routes.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply