dbatools is a free PowerShell module with over 180 SQL Server administration, best practice and migration commands included.


Get-DbaTempdbUsage

This function queries DMVs for running sessions using Tempdb and returns results if those sessions have user or internal space allocated or deallocated against them.

Screenshots

Examples

Gets tempdb usage for localhost\SQLDEV2K14.

Get-DbaTempdbUsage -SqlInstance localhost\SQLDEV2K14

Gets detailed tempdb usage for localhost\SQLDEV2K14.

Get-DbaTempdbUsage -SqlInstance localhost\SQLDEV2K14 -Detailed

Author

This command was created by Shane O’Neill. You can find Shane blogging at nocolumnname.wordpress.com.

Get-Help

From PowerShell, execute Get-Help Get-DbaTempdbUsage -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaTempdbUsage.ps1 on GitHub
 

Related commands