Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to list login and db user names

Status
Not open for further replies.

IT247

IS-IT--Management
May 26, 2006
88
US
hello
is there a storedproc that will output the login names and the associated users for each database?

thx
 
When installing SQL you should use mixed mode. That way you can use either SQL or Windows. Best practice is to never ever use the 'sa' account. Don't give it out and don't allow anyone to use it. Lock up the password. If someone needs 'sa' rights then put their Windows account in the system admin role. To cut down on the ammount of logins I have to manage I will use windows groups. For example I manage 2 DBA's plus me. We are all a memeber of the Domain group named DBA. I add that group to the SQL server in the system admin role. We log in using our windows account. If you can you should delete the built in admin account also. Sometimes company policy or 3rd party apps will need it so you can't delete it. But it will allow accounts in the administrator group on the server to be 'sa' in your database server.
There are some very good articles on SQL Best practices. Search for them on Google. You should also join SSWUG. SQL Server world wide users group.
You will find tons and tons of scripts and articles to help you. Most likely someone has written what you are trying to do.
SQL Server Central is another good site.
Also keep posting on Tek-tips. There are some very good SQL Server experts here.
I hope I have been a help to you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top