Run SQL/T-SQL scripts on folder
What to do when you have several sql scripts to run in your DB? Put all in a folder and use this...
2018-02-09 (first published: 2018-01-24)
2,218 reads
What to do when you have several sql scripts to run in your DB? Put all in a folder and use this...
2018-02-09 (first published: 2018-01-24)
2,218 reads
Below script will remove database encryption key, database certificate and master key on all the user databases.
For tempdb database, you need to restart the SQL Server Instance to complete the process.
Note: It is advisable to take transaction log backup before this activity is performed.
2018-02-08 (first published: 2018-01-29)
2,196 reads
This procedure will help you to automation of link server failure status check with help of SQL agent job scheduling. Job query :-
exec proc_check_linked_servers 'profiler name','E-mail ID'
2018-02-07 (first published: 2018-01-30)
769 reads
2018-01-26 (first published: 2018-01-18)
12,452 reads
During a database migration or a side by side database upgrade project we need to migrate the MS SQL Server Agent jobs. This script compare jobs by names and shows unmatched jobs.
2018-01-25 (first published: 2018-01-20)
3,462 reads
How to insert data into a SQL Server Table using Powershell using Invoke-SQLcmd Commandlet
2018-01-24 (first published: 2018-01-11)
31,181 reads
Often we need to know on which stage is a maintenance operation such as: backup, restore, check database. You can get this information using my script.
2018-01-17 (first published: 2018-01-12)
618 reads
Show the difference between two dates (from, to) in format #d HH: MM: SS
2018-01-03 (first published: 2017-12-18)
493 reads
Powershell utility for
generating scripts for db tables with / without identity columns.It can also produce scripts for fixed number of rows
2018-01-02 (first published: 2017-12-18)
1,155 reads
2017-12-29 (first published: 2017-12-27)
1,653 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