Database Recovery

How to Auto Maintain Database Emails in SQL Server

If the Database Mail in your SQL Server is used extensively, all messages and attachments from those emails would be saved in the MSDB database. Eventually, MSDB database will grow in size and occupy more disk space. This will also increase the time taken to complete backup of system databases. In this article, we will learn how to automate the maintenance of SQL Server database email Using system stored procedures For this automation, we would be using sysmail_delete_mailitems_sp. It is SQL...

Read more »

What to Do If Your SQL Server Database Misses Key

If your database is missing a master key, service broker will try to access it and will throw errors in SQL Server Error log. In this article, lets learn how to verify keys in your database and how to install keys if they are missing. Entry in SQL Server Error log: If your SQL Server error log has entries as mentioned below, then the target database is missing its master key. Service Broker needs to access the master key in the database '%.*ls'. Error code:%d. The master key has to...

Read more »

What to Do If Secondary SQL Server Database in Your Replication Miss Data

Replication is a widely-used SQL Server concept for maintaining copies of a database at different locations. The major advantage with replication is the Object level control. Though it is easy to set up, an unhealthy replication status might take time to fix. In this article, we will learn how to fix secondary databases that are out of sync. Reasons When your subscriber is not receiving data from the publisher, any one from the below list could be the root cause The published article has...

Read more »