Category Archives: SQL Query

Azure – All DBs that are not in Elastic pools

Advertisements

Posted in Azure, SQL, SQL Query, Uncategorized | Tagged , , , | Leave a comment

All Databases without geo-replica on Azure Server

Query to find all Azure database without geo-replica configured.

Posted in Azure, SQL, SQL Query, SQL Server, Uncategorized | Tagged , , | Leave a comment

TSQL to find Deadlock count in Azure Server by date

   

Posted in Azure, SQL, SQL Query, Uncategorized | Tagged , , | Leave a comment

TSQL to find users and their access on a given database

TSQL to find users and their access on a given database

Posted in Script, SQL, SQL Query, Uncategorized | Tagged , , , | Leave a comment

TSQL to find size of all databases on a Server – Azure

Posted in Azure, Script, SQL, SQL Query, SQL Server, Uncategorized | Tagged , , , , | 1 Comment

Find In-Memory table in a given database

Note: In Azure if we use premium database functions we can not downgrade those databases into standard pricing tier. We need to remove premium database features before downgrading to Standard tier. I had to create multiple database copies to reproduce … Continue reading

Posted in SQL, SQL Query, SQL Server, Uncategorized | Tagged , , , , , , , , , | Leave a comment

Create SQL Script to restore Transaction logs

I was part of a Major incident this week and we had to restore days worth of transaction logs on multiple databases. Created SQL Query which generates the restore script

Posted in Script, SQL, SQL Query, SQL Server, Uncategorized | Tagged , , , , , , | Leave a comment