magritton
7/3/2015 - 10:44 AM

SQL List of DMV s.

SQL List of DMV s.

--Displays all of the open sessions and also displays the login name of the current user
select * from sys.dm_exec_sessions
select original_login()
--Returns size and fragmentation information for the data and indexes of the specified table or view in SQL Server.
select * from sys.dm_db_index_physical_stats (DB_ID(N'T1'), OBJECT_ID(N'ix_t1'), NULL, NULL , 'DETAILED')
--information about alerts that have been defined on the server
sp_help_alert