RSSAll Entries in the "MSSQL" Category

Restore MS SQL database backup on a server

This tutorial will show you how to restore MS SQL database a backup on a new server.

I presume you have backup file already. (If you do not have one and you can backup on the old server with right-click on the database inside MS SQL Management Studio and then ‘Backup‘)

So, you have moved the backup file on the new server, and now we have to create a database where the backup will be restored.
Login to the MS SQL server expand ‘Databases’ section right-click and choose ‘New Database’.


Create MS SQL Maintenance Cleanup Task

This is the fourth part of MS SQL backup maintenance plan tutorial, and continues from Create MS SQL Shrink Databases Task one.

In this tutorial we will discuss how to create and setup Maintenance Cleanup Task in MS SQL for outdated database backups and transaction logs.

The Maintenance Cleanup task removes files related to maintenance plans, including database backup files and reports created by maintenance plans.

By using the Maintenance Cleanup task, a package can remove the backup files or maintenance plan reports on the specified server. The Maintenance Cleanup task includes an option to remove a specific file or remove a group of files in a folder. Optionally you can specify the extension of the files to delete.

I will create two cleanup tasks. Drag two Maintenance Cleanup tasks one for the databases and one for the transaction logs.


Create MS SQL Shrink Databases Task

This is the third part of MS SQL backup maintenance plan tutorial and continues from Create MS SQL Back Up Database Task.

Here we will discuss how to create and setup MS SQL Shrink Databases Task.

Each file within a database can be reduced to remove unused pages. Although the Database Engine will reuse space effectively, there are times when a file no longer needs to be as large as it once was; shrinking the file may then become necessary. Both data and transaction log files can be reduced, or shrunk.

The database files can be shrunk manually, either as a group or individually, or the database can be set to shrink automatically at specified intervals.

To add the ‘Shrink Databases Task’ drag it from the Maintenance Plan Tasks list, select it into the field, connect it with the arrow from the previous backup task, right-click on it and choose ‘Edit’.

Create MS SQL Back Up Database Task

This is the second part of MS SQL backup maintenance plan tutorial. Here we will discuss how to create and setup MS SQL Back Up Database Task.

In the previous tutorial we started with setting up time frame when the maintenance plan will run as well as the first important part to check the data base integrity, before starting the backup.

Now, the next option will be to create ‘Back Up Database Task‘ which allows you to specify the source databases, destination files, and overwrite options for a backup.


Create MS SQL Backup Maintenance Plan

Probably one of the worst things that can happen is to loose data especially a database which is dynamically changed. In this case if you do not have backup, you could loose money, time, nerves, etc.

With few step-by-step tutorials I will show you how to set backup maintenance plan in MS SQL.

I will use Microsoft SQL Server Management Studio, where in the management section I will set new maintenance plan which will create MS SQL backups on daily basis.

First open MS SQL Server Management Studio and expand the ‘Management’ section, then ‘Maintenance Plans’ section: