Scripts

Amazon RDS SQL Server - Drop Database with Mirroring

Dropping database in RDS follows different method than dropping the database in local SQL Server. Below is the command to DROP the database in Amazon RDS EXECUTE msdb.dbo.rds_drop_database N'demodb' GO However when the SQL Server is configured with Multi-zone mirroring, then you need to set the partner to OFF and drop all active connections and […]

2020-01-17

12 reads

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node.  The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression. 

2019-11-24

128 reads

Create a view to Alter a Table and Add three Columns

I am teaching a database class at Queens College. The project entails the truncation of all of the data and loading new data into the  existing database "BIClass" from a single of the flattened data. One of the tasks of the project was to add these three additional columns to each of the tables (AlterTableAddColumnsUserAuthorizationKeyAndTwoTimeStamps): […]

4 (2)

2019-11-18 (first published: )

624 reads

Function and Queries to Convert Hierarchical Adjacency to Nested Json Arrays

This script converts hierarchical adjacency into nested json rows which contain the recursive "downlines" of each node.  The table-valued function treats each row in the original adjacency as the root node in a recursive common table expression. 

2019-11-12 (first published: )

513 reads

sp_PerfSQ

A diagnostic tool for identifying Performance features of active SQL Queries. It collects performance detail from DMVs for queries with executing requests and is designed to demonstrate and quantify Query Shaping optimisation techniques by: quantifying query workload and throughput characteristics providing behavioural descriptors of potential performance inhibitors - refer column ThrottlePotential The ThrottlePotential column is […]

5 (3)

2019-11-07

1,939 reads

Blogs

Azure Storage tips

By

As a followup to my blog post Azure Data Lake Store Gen2 is GA,...

Managing Agent Jobs on Availability Group Servers

By

As always, the scripts in this post can also be found on our Git...

Permissions required for row counts to show up on Object Explorer Details

By

I ran into a rather obscure permissions problem the other day. Since I wasn’t...

Read the latest Blogs

Forums

buy medical weed online

By rondavis544

Very important Health information that might help you or some one you know,((www.legalweedonlinestore.com/)) the...

wholesale hemp buds uk

By rondavis544

Treasure valley farm is a B2B company. Our bulk top class CBD hemp flower...

Why Getting Data Right Matters

By Louis Davidson (@drsql)

Comments posted to this topic are about the item Why Getting Data Right Matters,...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers