Trigger Based Change Data capture
This script capture INSERTs / UPDATEs / DELETEs on SQL Server table and logs to single table in JSON Format.
2017-12-22 (first published: 2017-12-01)
2,934 reads
This script capture INSERTs / UPDATEs / DELETEs on SQL Server table and logs to single table in JSON Format.
2017-12-22 (first published: 2017-12-01)
2,934 reads
Here is a script that can give the DBA a SQL Instance quick quality check.
2017-12-21 (first published: 2015-01-02)
7,064 reads
Script to grant a SQL a user read-only access to all the databases in Server instance except the system databases and
-- the Log shipped databases(if any : secondary :read-only)
2017-11-22 (first published: 2017-11-14)
23,540 reads
A function to truncate datetimes to month, quarter, hour etc and their multiples for convenient grouping
2017-11-21 (first published: 2017-11-14)
576 reads
https://github.com/ktaranov/sqlserver-kit/blob/master/Stored_Procedure/usp_BulkUpload.sql
2017-11-17 (first published: 2015-05-16)
5,231 reads
Get Logshipping report only when secondary is more than certain time behind Primary.
2017-11-14 (first published: 2017-10-27)
475 reads
With high transactions table the sys.syscommittab table does not gets deleted properly. Millions of backdated row remains. To delete the sys.syscommittab table below is the script.
2017-11-13 (first published: 2017-10-27)
913 reads
SQL Server procedure to script all tables in a given database to one or individual files on a given path.
2017-10-09 (first published: 2017-10-04)
2,911 reads
2017-10-05 (first published: 2017-10-02)
16,532 reads
Lists the job names and package names for jobs that execute SSIS packages (for packages stored in msdb).
2017-09-13 (first published: 2017-09-05)
2,028 reads
By Steve Jones
This month we have a new host, Meagan Longoria, who graciously agreed to help...
By Steve Jones
I’m at the UK Redgate office today, meeting with senior leaders in all areas...
Optimizing Azure SQL Database performance often begins with identifying the most resource-intensive queries. Understanding...
Comments posted to this topic are about the item Creating a JSON Document IV
By VishnuGupthanSQLPowershellDBA
Comments posted to this topic are about the item Restoring Azure Key Vault Keys...
When the schema of an object is changed, SQL Server wipes out the previous...
I have this data in a table called dbo.NFLTeams
TeamID TeamName City YearEstablished ------ -------- ---- --------------- 1 Cowboys Dallas 1960 2 Eagles Philadelphia 1933 3 Packers Green Bay 1919 4 Chiefs Kansas City 1960 5 49ers San Francisco 1946 6 Broncos Denver 1960 7 Seahawks Seattle 1976 8 Patriots New England 1960If I run this code, how many rows are returned?
SELECT YearEstablished, json_objectagg(city : TeamName) FROM dbo.NFLTeams GROUP BY YearEstablished;See possible answers