MS SQL server mirroring remove end points master key

MS SQL server mirroring remove end points master key
You can create a master key in your SQL server

create master key encryption by password = 'abc123!!';

If you get below error

There is already a master key in the database. Please drop it before performing this statement.

you can remove existing master key

Drop Master key

If you ge below error

Cannot drop master key because certificate 'HOST_B_cert' is encrypted by it.

You need to delete that end points.

You can get list of All end Points by executing below query

Use Master

select
* from sys.EndPoints

Drop endpoint endpoint_mirroring

Now, you can drop the Certificates associated with that endPoint

Drop certificate Host_My_certificate_name

Then you can drop Master Key

Drop Master key

If you create new Master Key using encryption by passowd, you may receive below error.

"An error occurred during decryption"

You can fix this by force fully auto generating the key using Force option and later generate your own key

ALTER SERVICE MASTER KEY FORCE REGENERATE

The alter database for this partner config values may only be initiated on the current principal server for database "DBNAMe".

Means you need to set partner for witness on current Principal server


 

MS SQL server mirroring remove end points master keyMS SQL server shutdownRESTORE cannot operate on database because it is configured for database mirroring Use ALTER DATABASE to remove mirroring if you intend to restore the databasegodaddy hosting MS SQL server configurationGridview select emailThe shrink operation is not duplicated on the mirror database when you use database mirroring in SQL Server 2005c# send SMS (Text)MS SQL server Transaction commit rollbackCould not load file or assembly SystemServiceModelDomainServicesHosting Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of its dependencies The system cannot find the file specifiedMS SQL server service packasp net image upload

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.