SQL Server – Translate object_ids/object_names
— Get object_id from object name select OBJECT_ID(‘[dbo].[testobject]’) — get object_name from object id select OBJECT_NAME(213575799)
— Get object_id from object name select OBJECT_ID(‘[dbo].[testobject]’) — get object_name from object id select OBJECT_NAME(213575799)
Use this query in conjunction with sp_who to display running tasks and determine whether there are sessions blocking other sessions, and who is executing the query (sp_who) SELECT command, r.session_id, r.blocking_session_id, s.text, start_time, percent_complete, CAST(((DATEDIFF(s,start_time,GetDate()))/3600)…
See the article: http://sqlmag.com/database-performance-tuning/seven-step-process-changing-database-collation
Real Memory Consumption = Total – (free + buffers + cached) # free -m total used free shared buffers cached Mem: 15943 15678 265 6 511 3706 -/+ buffers/cache: 11460 4483 Swap: 8159 0…
ipconfig /flushdns
$env $env:path $env:PSModulePath Full list Get-Childitem env:
When you want to capture a menu option, (that annoyingly disappears when you try to capture with snipping tool), use the following procedure: Ensure there is no current capture in the snipping tool program (open/reopen…
To get help about regular expressions in powershell, at the command prompt: help about_regular_expression
use[master] — SQL Server authentication logins select * from sys.sql_logins — all logins/users select * from sys.server_principals order by type_desc
use [msdb] select * from sysjobs select * from sysjobactivity select * from sysjobs_view select * from sysjobhistory order by job_id, step_id