Pages

Wednesday, August 22, 2012

Useful System views of SQL Server

Useful System views of SQL Server


View Name View Description
Sys.Sysobjectscontains all the objects created in sqlserver
Sys.sysserverscontains info about the servers
Sys.sysremoteloginscontains info about remotelogins
Sys.sysprocessescurrent processes being done by sqlserver
Sys.sysperfinfoInfo about all types of performance related counters performing on Server
Sys.sysmessagesInfo about all error messages with error id and severtiy
Sys.sysloginscomplete detailed info regarding creating the login including password,default Db,lang etc
Sys.sysdatabasesinfo about DB name,DBID,version,CrDate,MDF location etc
Sys.syscursortablesinfo about cursors created in DB
Sys.sysconfiguresinfo about server configuration
Sys.syslanguagesinfo about all the languages that server supports
Sys.syscacheobjectsinfo about sysobjects getting updated when somethg happened wrt to DB or server
Sys.sysaltfilesinfo of All DB's Data and Log files and its properties
Sys.sysfilesinfo about system files with physical location
Sys.sysusersinfo about the users of Server
Sys.systypesDatatypes of SQLServer with all its properties
Sys.sysconstraintsConstraints described in DB
Sys.sysforeignkeysForeign keys described in DB
Sys.syscommentscontains info of all system inbuilt views/procs/functions
Sys.all_sql_modulescontains definition of all system inbuilt views/procs/functions
Sys.syscolumnsColumns defined in the DB's
Sys.sysobjectsAll objects details 
Sys.all_parametersParameters declared along the DB's
Sys.all_columnsColumns defined in the DB's
Sys.all_viewsAll views of DB's
Sys.all_objectsAll objects of DB's
Sys.sys.dm_tran_active_transactions to find active transactions
Sys.sp_delete_backuphistorywill delete the complete backup history
Sys.msdb..restorehistorytable which has all the details of databases restored