Q&A archive

Stack Exchange Answers

Questions and answers Andy Mallon contributed across the Stack Exchange network.

DBA Stack Exchange

how azure sql geo replication works internally?

Question My company moved to azure and started to use azure Sql database and geo replication. For our on-premise servers, we heavily rely on Microsoft transactional replication to move data. Now we setup transactional replication between on-premise server …

Read answer

DBA Stack Exchange

SQL Visual Studio Find and Replace in Publish Profile

Question We have source control in Visual Studio Database Projects (SSDT). To make cross database references, we utilize something like this below in Project References. We need Project references, since Otherdatabase, can choose between two options at our …

Read answer

DBA Stack Exchange

How Large Table before Using Clustered Columnstore Index

Question At what size should we consider applying Columnstore Index on a table? Is there a SQL Server storage or design guidance? Our Data Warehouse is 5TB total. Additionally, we have tables which are 100GB to 1TB which compose the database. Just curious if …

Read answer

DBA Stack Exchange

LOG_RATE_GOVERNOR Wait Stat

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 it possibly being …

Read answer

DBA Stack Exchange

Rebuild Very Large Primary Key Index

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 and it won't …

Read answer

DBA Stack Exchange

SQL Server FCI won't start after OS Upgrade

Question I have a two node sql server 2008 r2 cluster that we just did an OS upgrade from windows 2008 r2 to windows 2012 r2, the OS upgrade was done in place so the SQL Server Installation stayed in tack. The cluster role won't come back online saying it's …

Read answer

DBA Stack Exchange

Why does it take so long to view logs on a server?

Question I am just trying to look up more verbose information for a maintenance plan task that failed. I open up the log file viewer and check the box to view the logs for my maintenance plan. There are no active filters besides that in this example. Then I …

Read answer

DBA Stack Exchange

Load balancing reads SQL Server 2016 AG

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 …

Read answer

DBA Stack Exchange

Preventing SQL injection in dynamic SQL

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 answer