Any SQL Server DBA (of course, this applies to all platforms) will agree that database backups are the most essential things for data professionals. Monitoring those backups’ statuses is crucial. To make this task more straightforward, I have created a custom Stored Procedure. It will allow you to get the latest database backups’ (if any) statuses for all the necessary databases under your care.Read More
A vital part of preventing any kind of data loss in any situation is having appropriate backup and recovery policies. It is also essential to ensure data recovery at any point in time of the application workflow life cycle. Both MySQL and MariaDB offer solutions for these cases. This article will explore the existing options and procedures of how to backup MySQL Database and MariaDB as well as recovery strategies.Read More
The current article focuses on applying the mysqldump utility to backup and restore MySQL databases. This utility is the most common tool for generating backups in several formats or restoring MySQL databases.Read More
Database mirroring is a SQL Server high availability solution provided by Microsoft, with the following components.
- Principal database server: a source database that you configure for the mirroring.
- Mirror database server: a destination database that you must restore with NORECOVERY. Ideally, a mirrored database should be on a separate server.
- Witness Server: an optional component that you can set up to configure the mirror with automatic failover.
- Endpoint: the communication medium used by the principal and mirror server. The mirror listens on port number 5022; however, you can change it during the configuration.
Maintenance plans in SQL Server give us an easy way to organize, configure, and schedule tasks that ensure that the database engine and the databases that are hosted therein are kept in shape.Read More
An Overview of Traditional Recovery
As with all relational database systems, SQL Server guarantees the durability of data by implementing crash recovery. Durability in the acronym ACID which refers to the characteristics of transactions in relational databases means that we can be assured that if the database fails suddenly, our data is safe.
SQL Server implements this capability using the transaction log. Changes made by all Data Manipulation Operations in SQL Server are captured in the transaction log before being applied to data files (through the checkpoint process) in case it’s needed to roll back or roll forward.
This is an introductory article about automation in SQL server primarily focused on the basic concepts. We will discuss some standard practices and a few examples to help beginners get started with SQL server automation.
This article also highlights the importance of automating SQL server tasks to save time and effort required to do these tasks manually.
Additionally, we will look at cases in which it is not a good idea to automate SQL server tasks despite the fact that automation saves time and effort. Read More
This article is about automating SQL database maintenance tasks through SQLCMD utility which lets you run T-SQL commands directly from the command prompt without using SSMS (SQL Server Management Studio).
Typically, automating database tasks requires SSMS (SQL Server Management Studio) for scheduling jobs that run these tasks, but in this article, an alternative approach is used to automate database tasks without having to use the much-needed SSMS.
The SQLCMD utility can be a real time saver for database developers and DBAs since they can immediately run the necessary SQL scripts from the command line, and automating database maintenance tasks with the SQLCMD utility is a plus.
You can find a lot of guides on how to backup and restore databases. In this one, we’ll show how this can be done using the default MS SQL Server means.
This example will cover a number of approaches – from checking the database’s integrity before backing it up to restoring the database from a previously created backup copy.
In the last two or three months, I have been asked twice for a solution native to SQL Server that consolidates a backup report for several SQL Server instances across an enterprise. This question came from friends that did not necessarily want to spend money buying a tool but were more inclined to leverage the capabilities of SQL Server. I have thought about two possible ways to achieve this:
- Using Linked Servers, catalog views, SQL Agent Jobs and Database Mail
- Using Central Management Server
In this article, I will demonstrate the first and hope we shall have a second part of the article sometime later. Read More