9

SQL SERVER - How to Break Mirroring? - SQL Authority with Pinal Dave

 3 years ago
source link: https://blog.sqlauthority.com/2021/08/27/sql-server-how-to-break-mirroring/?utm_campaign=sql-server-how-to-break-mirroring
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

SQL SERVER – How to Break Mirroring?

While I am not a high availability expert, I sometimes get questions related to it while I am helping my clients with a Comprehensive Database Performance Health Check. Today we will see a very simple script to break mirroring in SQL Server.

SQL SERVER - How to Break Mirroring? breakmirroring-800x254

If you have configured mirroring on your environment and due to some reason, you need to break the mirroring, here is the simple script for the same.

Remove Mirroring

ALTER DATABASE [DatabaseName] SET PARTNER OFF;

Bring Mirrored Database Online

RESTORE DATABASE <database_name> WITH RECOVERY;

Well, that’s it. A very short blog post today. Do send me your questions and I will be happy to do answer you on my blog.

Here are my few recent videos and I would like to know what is your feedback about them. Do not forget to subscribe SQL in Sixty Seconds series.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

Related Posts

1 Comment. Leave new

  • Good one. May be can add Failover and Suspend too.

    ALTER DATABASE [DatabaseName] SET PARTNER FAILOVER;

    ALTER DATABASE [DatabaseName] SET PARTNER SUSPEND;

    Have a question. Whenever failover to happens, Identity value is reset to next whole number. If you take a case that identity value was 245 or 455 then it changes to 1000.

    Reply

Leave a Reply Cancel reply

Pinal Dave is an SQL Server Performance Tuning Expert and independent consultant with over 17 years of hands-on experience. He holds a Masters of Science degree and numerous database certifications.

Pinal has authored 13 SQL Server database books and 40 Pluralsight courses. To freely share his knowledge and help others build their expertise, Pinal has also written more than 5,500 database tech articles on his blog at https://blog.sqlauthority.com.

Pinal is an experienced and dedicated professional with a deep commitment to flawless customer service. If you need help with any SQL Server Performance Tuning Issues, please feel free to reach out at [email protected].

Pinal is also a CrossFit Level 1 Trainer (CF-L1) and CrossFit Level 2 Trainer (CF-L2).


Nupur Dave is a social media enthusiast and an independent consultant. She primarily focuses on the database domain, helping clients build short and long term multi-channel campaigns to drive leads for their sales pipeline.


Exclusive Newsletter

Is your SQL Server running slow and you want to speed it up without sharing server credentials? In my Comprehensive Database Performance Health Check, we can work together remotely and resolve your biggest performance troublemakers in less than 4 hours.

Once you learn my business secrets, you will fix the majority of problems in the future.


Have you ever opened any PowerPoint deck when you face SQL Server Performance Tuning emergencies? SQL Server Performance Tuning Practical Workshop is my MOST popular training with no PowerPoint presentations and 100% practical demonstrations.

Essentially I share my business secrets to optimize SQL Server performance.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK