LOG_RATE_GOVERNOR Wait Stat

September 18, 2017 Andy 0

Question I’m noticing this wait stat on my Azure SQL database, and I’ve never seen it before. I’ve tried Googling this wait stat but haven’t been able to come up with any good information on what this is, although I saw a couple mentions of … [Read More]

Rebuild Very Large Primary Key Index

September 2, 2017 Andy 0

Question I have a SQL database that is hosted on Azure. The problem is that the size is getting out of control, I can see up to 99% fragmentation in the Primary Key clustered indexes. I’m able to rebuild all other indexes with online=on option … [Read More]

Load balancing reads SQL Server 2016 AG

April 19, 2017 Andy 0

Question I’m trying to balance read traffic between two SQL Server 2016 Enterprise Edition instances (Primary and Secondary) using availability groups and the read only routing. Here is my current setup: The servers are in AWS in two different AZ The servers are in a … [Read More]

Preventing SQL injection in dynamic SQL

April 14, 2017 Andy 0

Question Let’s imagine a stored procedure that retreives data and do some kind of pagination. This procedure has some inputs describing which set of data we want and how we sort it. Here is a very simple query, but let’s take it as an example. … [Read More]