Skip to content

Instantly share code, notes, and snippets.

View AndyMeps's full-sized avatar

Andy Mepham AndyMeps

  • Kent, United Kingdom
View GitHub Profile
/* SELECT * FROM sys.views WHERE name LIKE '%BySize%' */
DECLARE @Grouping AS TABLE (
BusinessId INT
,SizeInBytes BIGINT
)
INSERT INTO @Grouping
(BusinessId, SizeInBytes)
SELECT
If you can't get Edge to access localhost websites, run command prompt as administrator and run the following command
CheckNetIsolation LoopbackExempt -a -n=Microsoft.MicrosoftEdge_8wekyb3d8bbwe
@AndyMeps
AndyMeps / create_log_file_usage_table.sql
Last active October 19, 2015 16:23
Logs database log file sizes to a table in the [master] schema for diagnostic / analytic purposes.
CREATE TABLE [master].[dbo].[LogFileUsage] (
[Id] [int] IDENTITY(1,1) PRIMARY KEY NOT NULL
,[DatabaseName] [nvarchar](100) NOT NULL
,[LogSize] [real] NOT NULL
,[PercentageUsed] [real] NOT NULL
,[LogDateTime] [datetime] NOT NULL DEFAULT GETDATE()
)