Wednesday, August 24, 2016

Unable to send notifications for Multi-server jobs to custom Operator

So it turns out that you can't configure a custom operator to notify for a multi-server job (SQL 2014). not sure if this is the case on SQL 2016 yet.

This job has one or more notifications to operators other than 'MSXOperator'


BTW if you do manage to save this multiserver job it  may also cause your Multiserver job to become blocked on the target server and you'll need to manually clear it out.


If you find this article useful please leave me a comment.

Wednesday, August 17, 2016

Check if Primary Replica before running a SQL Job

I needed way to tell if my SQL job was running on the Primary or the secondary replica (fail if equals a secondary).

This will still work if runs on a server/instance that isn't Always On

If exists (SELECT name FROM sys.databases a INNER JOIN sys.dm_hadr_availability_replica_states b ON a.replica_id=b.replica_id WHERE b.role=2)
 raiserror ('Not primary',16,1)
else
 Print 'OK'


If you find this article useful please leave me a comment.

Friday, August 12, 2016

Census Australia 2016: Will we reach the minimum number of completed forms?

Census Australia 2016: Will we reach the minimum number of completed forms?: "On Facebook, Lyne posted she wouldn’t be completing the survey online.
“In your dreams I wouldn’t touch it with a barge pole. Where will my info go????? Give me the paper form.”"



Won't fill out information online, but happy to fill it out offline and hand that information to random stranger? hhahaha.





'via Blog this'

If you find this article useful please leave me a comment.