SQL Server

  • Session Information

    select *

    from sys.dm_exec_connections con,

    sys.sysprocesses procs,

    sys.dm_exec_sessions sess

    where con.session_id = procs.spid

    and sess.session_id = procs.spid

    and procs.spid 50

  • Server Information

    SELECT

    SERVERPROPERTY('ProductVersion') AS ProductVersion,

    SERVERPROPERTY('ProductLevel') AS ProductLevel,

    SERVERPROPERTY('Edition') AS Edition,

    SERVERPROPERTY('EngineEdition') AS EngineEdition, …