Quantcast
Browsing latest articles
Browse All 127 View Live

How to check Microsoft SQL Server Shrink Status

If you want to see SQL Server Shrink status, you can use following query: SELECT percent_complete, total_elapsed_time, start_time, status, estimated_completion_time FROM sys.dm_exec_requests WHERE...

View Article


Using if/else statement in C# Razor

Just a reminder for myself :) @(userRole == 0 ? "Yes" : "No") Also you can use this like “else if”: @(userRole == 0 ? "Yes" : userRole == 1 ? "Yes" : "No") You can use this statement in div tags...

View Article


Sending parameters to HTML.Partial in C#

You can send extra parameters to HTML.Partial with following example: @{Html.RenderPartial("~/Views/Shared/GlobalScripts.cshtml", new ViewDataDictionary { { "timeRangeSessionValue",...

View Article

Windows Containers Management with PowerShell Series – Part 1

Windows Containers are finally here! Lets start our new series :) Container management is very similar to Hyper-V management. For example: Lets check our commands: PS C:\Users\Administrator>...

View Article

Getting all table column names of MSSQL database

If you need to get all table column names from MSSQL database, you can use following query: SELECT o.name, c.name FROM sys.COLUMNS c INNER JOIN sys.objects o ON c.object_id=o.object_id ORDER BY o.name,...

View Article


Getting Stored Procedure Stats from MSSQL

Following query will give you details about SP usage: SELECT DB_NAME(database_id) DBName, OBJECT_NAME(object_id) SPName, last_execution_time LastExec, last_elapsed_time/1000 LastTimeMS,...

View Article

MSSQL Database Index Fragmentation Reports

You can get Database Index Fragmentation Reports with following query: SELECT object_name(ps.object_id) AS [name], ps.index_id, i.name AS IndexName, ps.avg_fragmentation_in_percent, ps.fragment_count,...

View Article

MSSQL Database Performance Tricks

Check following query to improve your database performance: EXEC sys.sp_configure N'show advanced options', N'1' RECONFIGURE WITH OVERRIDE GO EXEC sys.sp_configure N'max server memory (MB)', N'11000'...

View Article


MSSQL Server Index Reports

This is a query of mine, which gives you detailed information about indexes on one query: SELECT SO.NAME AS TableName, PS.object_id AS ObjectId, SI.NAME AS IndexName, PS.index_id AS IndexId,...

View Article


Agentless Monitoring of Nano Server on Azure

Nano Server monitoring is kind of a challenge for System Administrators. Even if your current monitoring product supports Nano Server, installing agents on Nano could be a headache. In this article, I...

View Article
Browsing latest articles
Browse All 127 View Live