Category Archives: SQL

Find actively running SQL statements using Querystore-QueryID

TSQL to Find actively running SQL statements using QueryID

Posted in Performance, Querystore, Querystore, SQL, SQL Query, SQL Server | Tagged , | Leave a comment

MSSQL Server – Monitors I recommend to run once a month

Though most of our monitors are configured to run from same tool at same interval, it is work to evaluate how frequently we run them based on its a few factors. in this post I list a few monitors/ checks … Continue reading

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

Resolved – Setup Doesnot Start For Sql Upgrade/Patch – 0x80004005

Installing SQL Service Pach or Hotfix does nothing; In general all the install logs will be available at Setup Bootstrap (Example: C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\Log ), however you will not be able to see any additional infomration. Before moving … Continue reading

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

Maximum capacity specifications for SQL Server/ Azure DB/ Automation

Ever wonder what are the Maximum capacity specifications for SQL Server? Here you go: https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-ver15 SQL Server Limits: https://docs.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-ver15   Azure Service and subscription limits: https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits      

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

SQL – AlwaysOn Availability Group synchronization delay troubleshooting

I learned detailed step by step performance metrics and xevents that can be used to troubleshoot  AlwaysOn Availability Group synchronization delay.   https://docs.microsoft.com/en-us/archive/blogs/sql_server_team/troubleshooting-high-hadr_sync_commit-wait-type-with-always-on-availability-groups   Some network configuration that can be updated to address network challenges: https://docs.microsoft.com/en-us/windows-server/networking/technologies/network-subsystem/net-sub-performance-tuning-nics    

Posted in Performance, Referene, SQL, SQL Server, Uncategorized | Tagged , , , | Leave a comment

Very Large Database in SQL Server – How is it different

Following are a few considerations while managing a very large database on Microsoft SQL Server. I am not recommencing any configuration as different configurations are good fit for different workloads and business requirements but these are the items that can … Continue reading

Posted in Performance, SQL, SQL Error, Uncategorized | Tagged , , , | Leave a comment

MSSQLSERVER Error Catalog

https://docs.microsoft.com/en-us/sql/relational-databases/errors-events/database-engine-events-and-errors?view=sql-server-ver15

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

SQL Job history – Getting end time from sysjobhistory

Run_date, run_time, run_duration are stored in int format in sysjobhistory table, not user friendly. For a quick solution I had to pull the history from last X hours. This simple TSQL helped to find end time of the step!

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

QueryStore – Regressed queries based on execution count

Handy TSQL statement to find gergressed queries on a given time based on execution count. I had a scenario to validate if application is executing any statements more frequently on a given time. Following SQL can be used to find … Continue reading

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

Fix: SQL Server – using X logical processors based on SQL Server licensing, not using all processors

I had an experience where a server with 36 cores is using only 20 cores for SQL Server 2012. It was identified that Enterprise Edition is being used which limit SQL to use only 20 CPUs. Research indicates that the … Continue reading

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