Monday, November 12, 2018

SQL Server: getting the lay of the land

If you inherited a SQL Server instance, the following queries are helpful, especially because the SSMS UI doesn't show you creation dates or who created them.


select * from sys.credentials
select * from msdb.dbo.sysproxies
select * from sys.sql_logins
select * from sys.server_role_members
select * from sys.databases order by create_date
select * from msdb.dbo.sysjobs order by date_created