SQL Server emergency? Email pinal@sqlauthority.com with URGENT in the subject line.

Azure SQL Firewall Rules: List, Add and Remove With T-SQL

Azure SQL firewall rules decide which IP addresses can reach a logical server and its databases. This post lists the server-level and database-level rules with T-SQL, adds, changes and removes one, and explains how to find the address Azure sees. It also covers the one thing T-SQL cannot do, which is let you in for the first time.

Continue Reading

Background Job Queue: List Active Jobs and Kill a Stats Job

The background job queue holds work that SQL Server runs outside your queries, such as asynchronous statistics updates. This post lists the active jobs, reads the queue counters, catches a real statistics job in a demo and kills it with KILL STATS JOB. It also corrects a common mix-up: the command takes the job ID, not the session ID.

Continue Reading