Ad Hoc Logs
We often make changes to production systems in an ad hoc manner. Steve asks how much auditing we might have in place.
We often make changes to production systems in an ad hoc manner. Steve asks how much auditing we might have in place.
You have times where you need to copy/paste something out of SSMS' grid view results pane that has a carriage return in it. Trying to copy/paste that data into Excel can be a headache and cause you to waste precious time reformatting. This just offers a tidbit of PowerShell code to help.
Stored procedures, for example, are very easy to document. The comment block at the beginning stays with the code and a CREATE or ALTER script contains everything to reproduce the proc. SQL Server tables, however, are more difficult to document. You can use Extended Properties to document columns and constraints, but working with Extended Properties is difficult at best. Phil Factor demonstrates ways to easily add Extended Properties to your build scripts.
Updates this week for SQL 2014, 2016, 2017 and SSMS have Steve thinking about the pace of patching.
This article shows how DefaultBufferMaxRows and DefaultBufferSize properties can be used to improve dataflow task performance.
Brent Ozar takes a look at four different ways to get a random row from a large SQL Server table.
Joe Celko reminisces about the origins of databases and one of the early pioneers, Charles Bachman. He explains how pointer chains were used to traverse data in the NDL standard and referential integrity that we use today.
Developers need to consider not only system performance when writing code, but also how readability impacts code maintenance.
Nat Sundar explains the different ways to load JSON data into SQL Server, along the way also covering the use OpenRowset and OpenJSON functions to manage JSON data effectively.
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...
I’ve been learning more about the google knowledge panel and it seems like one...
I’m currently researching the best wireless credit card terminal for a growing business and...
Comments posted to this topic are about the item Creating a JSON Document IV
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