This script list all the users defined for each database on the server, it give the database name, the login name and the role defined.
Its use full to have quick view of witch users are dbo on witch database
Ensure that you have the result in grid in query analyzer, and just cut and paste the result in an excel file to do some extra manipulation, or just the way you want.
This script can be executed on any database, it does not refer to the current database.
You will need sa privilege, or access to the sysdatabases table in master, and access to each databases.
Harnessing SQL Server Metadata- Disabling and Rebuilding Indexes
When doing bulk data changes it may be beneficial to disable indexes prior to starting the operation. Fortunately, SQL's rich metadata makes this very easy to automate in a robust fashion.
2018-05-18 (first published: 2015-10-19)
4,846 reads