Create an additional SQL Server Login

Sometimes you need to create an additional SQL Server Login (user) for your database (databases). Here is a small T-SQL snippet that creates such a login for contained databases in SQL Server and adds memberships.

Read More

Manually failover all databases in an SQL Server Database Mirroring configuration

How to manually failover an SQL Server database mirroring session? A manual SQL Server failover can only be initiated from the principal server, and the mirrored database must be synchronized (that is, when the database is in the SYNCHRONIZED state). In this article I’ll show you how to manual failover mirrored SQL Server databases using Transact-SQL (T-SQL) in SQL Server 2017+.

Read More