Scripts

Technical Article

Automatically Failover (Enable or Disable) Jobs Based on HADR Role

If you have a SQL Server with a High Availability solution (AlwaysOn Availability Groups, Database Mirroring, etc.), and you also have a bunch of jobs which you need to be run on the Primary server only. You need to be able to "failover" the jobs in case the Primary server is no longer Primary.

★ ★ ★ ★ ★ ★ ★ ★ ★ ★

(1)

You rated this post out of 5. Change rating

2018-11-14 (first published: )

6,195 reads

Blogs

Asking for Help Isn’t a Weakness

By

During COVID, I attended training on software/enterprise architecture given by Mark Richards. One of...

The Proof of the Backup Is in the Pudding

By

For me, the objective is straightforward: have a backup strategy that is reliable, understandable,...

T-SQL Tuesday #204 – Are blogs still relevant?

By

Note: This post is the invitation for T-SQL Tuesday #204 on November 3rd, 2026....

Read the latest Blogs

Forums

Alamat Telp BCA KCP Sulawesi (+62) 838-4945-0961

By layanan 24jam BCA

Wa:083849450961 Jl. Sulawesi No.34, Pattunuang, Kec. Wajo, Kota Makassar, Sulawesi Selatan 90174

Alamat Telp BCA KCP Poris Indah (+62) 838-4945-0961

By Halo_BCA

Wa:083849450961 Ruko Poris Indah, Komp, Jl. Poris Indah Blok K No. 2-3, RT.003/RW.003, Cipondoh...

The ##MS_DatabaseConnector## User

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The ##MS_DatabaseConnector## User

Visit the forum

Question of the Day

The ##MS_DatabaseConnector## User

On SQL Server 2025, I run this code as a sysadmin:

CREATE LOGIN Demo WITH PASSWORD = 'Demo1234567'
GO
ALTER SERVER ROLE ##MS_DatabaseConnector## ADD MEMBER Demo
GO
I then login as Demo and run this:
USE sandbox
go
SELECT CURRENT_USER
What is returned?

See possible answers