Finding “Orphaned” database files – script
When you drop a database from a SQL Server instance the underlying files are usually removed. This doesn’t happen however if you set the database to be offline first,...
2019-03-27
51 reads
When you drop a database from a SQL Server instance the underlying files are usually removed. This doesn’t happen however if you set the database to be offline first,...
2019-03-27
51 reads
When I’ve created resources in Azure it’s usually taken from a few minutes and up to quarter of an hour...
2019-02-26
840 reads
For T-SQL Tuesday #111, Andy Leonard asks “What is your why? Why do you do what you do?”
Like Andy, I...
2019-02-12
665 reads
If you plan on using Amazon Web Services (AWS) to host your SQL Server based applications in the cloud, then...
2018-12-12
859 reads
2018-09-13
5,046 reads
For this month’s T-SQL Tuesday Steve Jones asks us to talk about our experiences with Triggers:
https://voiceofthedba.com/2018/09/03/t-sql-tuesday-106-trigger-headaches-or-happiness/
In my post I’m going...
2018-09-12
260 reads
2018-07-24
4,999 reads
For this month’s T-SQL Tuesday Bert Wagner invites us to share SQL scripts we’ve written that we’d hate to live...
2018-07-10
295 reads
This is my favourite SSMS trick I’ve discovered recently, probably some time towards the end of last year.
Basically, when you...
2018-06-06
1,407 reads
Everyone, at the beginning of their SQL career, get’s told that it is important to include an ORDER BY if...
2018-05-30
421 reads
By SQLPals
Track SQL Server Configuration Changes Using the Error Log If you...
Good documentation gets you started. Good books get you deep. After years of working...
By Vinay Thakur
In previous posts, we looked at the SQL Server engine. for us DBAs, the...
WhatsApp:0817866887 Jl. Bukit Barisan No.3, Kesawan, Kec. Medan Bar., Kota Medan, Sumatera Utara 20111
WhatsApp:0817866887 Jl. Sudirman No.59, Bukit Cangang Kayu Ramang, Kec. Guguk Panjang, Kota Bukittinggi, Sumatera...
We have a SQL Server installed. We have a 500GB drive for the database....
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