For those site using SQL Server ids as opposed to Integrated security there may be instances where occasionally SQL Server logins might get 'orphaned'. That is the login is not a member of any server group that has general database access nor does that login have specific access to any particular database. Compile this proc in master and run periodically to delete these logins as a potential security exposure. If you would rather not delete the ids, comment out the line "EXEC sp_droplogin @username" and the proc will just report on ids that would be removed. Then you can decide whether these ids should or should not be removed.
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,845 reads