Storminator16
asked on
Can an Active Directory service account be used for an ODBC connection?
When creating a ODBC System data source (because I have an application that requires this), I used a Sql Server account and tested my connection; this worked fine. Under guidance due to our domain standards, I've been told to use a trused Windows NT account instead. I was provided with a service account name and it's password, but when testing the connection it fails. So, can an Active Directory service account be used at all, or is their possibly something else wrong? Thanks in advance.
Oh, when it is all set up, the way you define the conection string will change...
Right now, you probably have something like...
"Driver={SQL Server};Server=myServerAdd ress;Datab ase=myData Base;Uid=m yUsername; Pwd=myPass word;"
which you will want to change to...
"Driver={SQL Server};Server=myServerAdd ress;Datab ase=myData Base;Trust ed_Connect ion=Yes;"
Let me know if that helps.
Regards,
David.
Right now, you probably have something like...
"Driver={SQL Server};Server=myServerAdd
which you will want to change to...
"Driver={SQL Server};Server=myServerAdd
Let me know if that helps.
Regards,
David.
ASKER
Ok, assume everything is kosher. Can a service account be used in an odbc connection?
By service account, I assume you mean a regular domain ID that has been created by a domain admin, but which is not "tied" to a particular individual, so it is designed to be used for programmatic connectivity, rather than a user's personal access to the domain? If so, then I do not see why this would not work. Your application should be running as the domain ID that has been set up for you (service account), as the "Trusted_Connection = Yes" part of the connection string will want to pass the domain credentials of the user account which is running your application.
I'm not a huge fan of using a trusted connection for exactly this reason, and much prefer to set up a generic (and extremely locked down) SQL server account for each application.
Let me know if this helps any.
Thanks!
David.
I'm not a huge fan of using a trusted connection for exactly this reason, and much prefer to set up a generic (and extremely locked down) SQL server account for each application.
Let me know if this helps any.
Thanks!
David.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
If you are not an admin on the SQL Server, you will need to have someone who is check this for you. I would hope that because you were given a domain account name to use, that it already has rights on the SQL Server to some extent. It may just need adding to your particular Database, or Table(s).
Good Luck!
David.