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
 General SQL Server Forums
 New to SQL Server Programming
 Database username/password to use

Author  Topic 

xrum
Yak Posting Veteran

87 Posts

Posted - 2009-07-07 : 15:20:35
hello,

when creating an application, what username/password should i be using when connecting to my sql database.

i have my own, which is myusername/password, but there is also a list of other users.

if i am developing an app for someone else, should there be a generic username/password to use or do i just use my own?

hope that makes sense

Thanks!

Skorch
Constraint Violating Yak Guru

300 Posts

Posted - 2009-07-07 : 16:12:26
It's probably a good idea to create an a new username for the application. If actual users will be logging in then they'll need their own logins. If it's an application that will be the only one accessing your database then you need to create a service account for it (just a username with the necessary permissions for the application to function).

Some days you're the dog, and some days you're the fire hydrant.
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2009-07-09 : 15:18:16
Depends on what sort of tracking you want to do. For example, if you want to audit exactly who made a change, then your app should probably be doing impersonation so that it connects to the database as the application user. Of course this also requires that your application know who the user is. If that's not needed, then an application-specific login will work.

When creating an app for someone else, be sure to check with their DBA regarding rules and restrictions that they require.

--------------------------------------------
Brand yourself at EmeraldCityDomains.com
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2009-07-09 : 16:21:49
I usually use 1 Login/User that the application layer uses.

We then use an application login which is authenticated for each user.

We do this using RACF

This eliminates the need for us to manage logins and users in SQL Server



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -