Skip to content

Instantly share code, notes, and snippets.

View ststeiger's full-sized avatar
😎
Back from holidays

Stefan Steiger ststeiger

😎
Back from holidays
  • Switzerland
View GitHub Profile
@ststeiger
ststeiger / Diff_Routine_Columns.sql
Created June 3, 2026 14:39
Diff the routine columns between two MS-SQL servers
/*
SELECT
TABLE_SCHEMA
,TABLE_NAME
,COLUMN_NAME
,ORDINAL_POSITION
,COLUMN_DEFAULT
,IS_NULLABLE
@ststeiger
ststeiger / Diff_Tables.sql
Created June 3, 2026 14:32
Diff table list between two MS-SQL servers
/*
SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
-- WHERE TABLE_TYPE = 'VIEW'
WHERE TABLE_TYPE = 'BASE TABLE'
FOR JSON PATH;
*/
DECLARE @db1JSON nvarchar(MAX) = N'[ ... ]';
DECLARE @db2JSON nvarchar(MAX) = N'[ ... ]';
@ststeiger
ststeiger / Diff_Indexes.sql
Created June 3, 2026 14:27
How to diff indexes between two MS-SQL DBs
/*
SELECT
s.name AS TABLE_SCHEMA
,t.name AS TABLE_NAME
,i.name AS INDEX_NAME
,i.type_desc AS INDEX_TYPE
,i.is_unique AS IS_UNIQUE
,i.is_primary_key AS IS_PRIMARY_KEY
,i.is_unique_constraint AS IS_UNIQUE_CONSTRAINT
@ststeiger
ststeiger / Diff_Columns.sql
Created June 3, 2026 14:26
How to diff columns between two MS-SQL server DBs
-- SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS
-- WHERE TABLE_NAME LIKE 'T_Checklist%'
-- GROUP BY TABLE_SCHEMA, TABLE_NAME
-- SELECT * FROM INFORMATION_SCHEMA.COLUMNS
-- WHERE (1=1)
-- AND TABLE_NAME LIKE 'T_Checklist%'
-- -- AND TABLE_NAME <> 'T_Checklist_Ref_EditRights'
-- FOR JSON AUTO
@ststeiger
ststeiger / Custom_Assembly_SSRS.txt
Created May 25, 2026 21:44
How to install custom assembly in SSRS/Visual Studio 2022
Quelle:
https://learn.microsoft.com/en-us/sql/reporting-services/custom-assemblies/deploying-a-custom-assembly?view=sql-server-ver17
Datei
CorQrCode.dll
Falscher Pfad:
C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\PrivateAssemblies
Richtiger Pfad:
@ststeiger
ststeiger / How_to_use_Dart_SASS.md
Last active May 6, 2026 09:37
Dart Sass setup and SCSS compilation guide

Dart Sass — Quick Reference

Releases: github.com/sass/dart-sass/releases


1. The Language & Its Syntaxes

Sass is the name of the CSS pre-processor language. It comes in two syntaxes:

@ststeiger
ststeiger / find_leaking_temp_tables.sql
Created April 22, 2026 12:40
Find leaking temp tables in MSSQL
SELECT TOP 1 *
INTO #foo
FROM T_Benutzer
;
IF OBJECT_ID('tempdb..#NOT_foo') IS NOT NULL DROP TABLE [#foo]; -- this is presumed buggy
-- Find leaking temp-tables
@ststeiger
ststeiger / disable_feedback.reg
Created March 25, 2026 10:26
Disable SSRS ApplicationInsights
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\SSRS\CPE]
"CustomerFeedback"=dword:00000000
"EnableErrorReporting"=dword:00000000
@ststeiger
ststeiger / fix_xrdp.sh
Created October 23, 2025 17:46
XRDP - restart the clipboard
#!/usr/bin/env bash
#
# restart_xrdp.sh - Interactive restart for xrdp related services
#
echo "Select what to restart:"
echo "1) chansrv"
echo "2) xrdp"
echo "3) xrdp-sesman"
echo "4) xrdp + xrdp-sesman"
@ststeiger
ststeiger / kill_rider.sh
Last active October 23, 2025 17:38
Kill Rider on Linux
#!/usr/bin/env bash
#
# kill_rider.sh - Kill all processes containing "rider" (case-insensitive)
#
# List matching processes first for safety, excluding this script itself
echo "🔍 Matching processes:"
ps aux | grep -i rider | grep -v grep | grep -v kill_rider.sh
# Ask for confirmation before killing