DBA Daily Commands in Handy
sp_who2 active:
View details of active processes on SQL Server Engine
DBCC INPUTBUFFER(session id):
View the current query being executed by a specific process
Check the open transaction in SQL Server:
DBCC OPENTRANCheck the blocked process:
SELECT * FROM sysprocesses where blocked > 0 and spid = 23;
select * from sys.sysprocesses where blocked != 0;Check the lock information:
SELECT * from sys.dm_tran_lockCheck the connection information from view in SQL Server:
SELECT * FROM sys.dm_exec_sessions;Check the database files location, size, and max size in SQL Server
SELECT * FROM sysaltfiles
Check the collation Setting on the SQL Server
SP_HELPSORT
Check the log Usage on SQL Server databases
select * from sys.databases where name like '%log_reuse_wait_desc%'
Comments
Post a Comment