0% found this document useful (0 votes)
21 views8 pages

Backup and Restore Sales Database Guide

This document provides instructions for backing up and restoring a database using Microsoft SQL Server Management Studio. The steps are: 1. Create a sample database called "Sales" with 5,000 rows of data for testing backup and restore. 2. Right click the Sales database, select Tasks > Backup to back it up to a file location on disk. 3. To restore, delete the Sales database table. Then right click the Sales database, select Tasks > Restore, locate the backup file, and restore the database to recover the deleted data.

Uploaded by

ruzzel04besin
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views8 pages

Backup and Restore Sales Database Guide

This document provides instructions for backing up and restoring a database using Microsoft SQL Server Management Studio. The steps are: 1. Create a sample database called "Sales" with 5,000 rows of data for testing backup and restore. 2. Right click the Sales database, select Tasks > Backup to back it up to a file location on disk. 3. To restore, delete the Sales database table. Then right click the Sales database, select Tasks > Restore, locate the backup file, and restore the database to recover the deleted data.

Uploaded by

ruzzel04besin
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MEMBERS:

ALBA, JULIUS
ALBAO, MARIEL
AMPARADO, JEROME
BESIN, RUZZEL
BREIS, ANGELA JULIA

Laboratory Exercise
Backup and Recovery

Creating a Database Backup

1. Open/launch the Microsoft SQL Server Management Studio from your Windows computer and
use the default login using Windows Authentication.
2. Create a database named Sales. Execute the following commands in Data_Insert by dragging
and dropping down the file to Microsoft SQL Server Management Studio, then click Execute.
The commands that have been executed will automatically insert five thousand (5,000) rows
of data that will be used for this exercise. See the image below.

Sales query
3. Now that our Sales database contains 1 table with 5,000 rows of data. We will create a backup
file of the whole database through the Tasks function. Right-click the sales database, then click
Tasks, then click Backup.

4. For the source section, you can choose what database you would like to create a backup and
the type of backup. Select the Sales as the database that we will create a backup.
5. In the destination of the backup section, select the disk option in the “back up to:” drop-down
list.
6. Remove the existing destination path that has been automatically created by selecting the
existing path then click Remove.
7. We will choose a path destination where we could save our backup file. Click the Add button
below the drop-down list, then click the three (3) dot or Option button to show the lists of files
to choose from.
8. In my case, I want to save my database backup file in drive D:\Documents. Note: Don’t forget to
set the proper file name of the backup. Then click OK (Select Backup Destination window).
If the selected backup destination is properly set, click OK (Locate Database Files window).
See the image below for an example.

7.

7.

8.

8.
9. In the previous backup window, click OK to finalize the backup configuration and start backing
up. It should show a window indicating that the created backup was completed successfully.

10. To check the backup file, locate the file based on the destination entered on the previous
procedure.

Restoring a Database Backup

1. For instance, our Sales database got destroyed or deleted by disaster or human error incidents.
To do this, delete the entire Sales_Record table by expanding our Sales database > Tables
folder > right- click the Sales_Record > Delete. Click OK when the prompt form shows.
2. Now, we need to restore the Sales database to get the database back in a consistent state.
Right-click the Sales database object, click Tasks > Restore > Database.
3. In the Restore Database - Sales window, select the device as the source, click the option or
three- dot button in the right corner, and then click Add to specify the backup file's file location.

4. Select the database backup file that we previously created using the Locate Backup File
window. Click All Files in the drop-down list to see your backup file. Select the database backup
file. Then click OK. See the following image for an example.
5. If the proper backup file is already selected, click OK to finalize the database to restore
configuration and start the process of restoring the database. It should show a window
indicating that the database Sales was restored successfully.s

Common questions

Powered by AI

The restore processes in SQL Server Management Studio are robust tools for mitigating the effects of human error, such as inadvertent database deletion. They provide a structured approach to recover lost databases by allowing users to select a previously created backup and restore it to its original state. The interface's guidance throughout the process ensures accuracy, and the option to specify backup files minimizes the likelihood of restoring incorrect data, effectively addressing human error impacts .

To restore the Sales database after deletion, open Microsoft SQL Server Management Studio, right-click on the Sales database object, and select Tasks > Restore > Database. In the Restore Database window, select the device as the source and click the option button to add the backup file location. Choose the backup file created earlier in the Locate Backup File window. Ensure the selected backup file is correct, then click OK to complete the restore configuration process. The system will indicate if the database was restored successfully .

To verify the successful creation of a backup, once the backup process is complete, a message window should indicate that the backup was completed successfully. To locate the backup file, navigate to the location specified during the backup configuration step. This involves checking the chosen destination path such as D:\Documents or the path set during the backup procedure .

Using the disk as the backup destination offers benefits such as faster read/write speeds compared to tape backups, flexibility in managing backup schedules, and easier access to backup files for restore processes. However, potential risks include limited storage capacity depending on the disk infrastructure, vulnerability to data corruption or loss if the hardware fails, and potential security risks if the disk is not adequately protected. Proper disk management and security measures are essential to mitigate these risks .

To create a backup of a database using Microsoft SQL Server Management Studio, first open the application and log in using Windows Authentication. Then, create a database named Sales and execute the Data_Insert commands to insert 5,000 rows of data. Next, right-click on the Sales database, select Tasks, and choose Backup. In the backup configuration, select 'Sales' as the database to be backed up and the disk option as the backup destination. Remove the existing path and add a new path where the backup file should be saved. Once configured, click OK to finalize and start the backup process. Ensure the backup was completed successfully by verifying the created file in the chosen destination .

SQL Server Management Studio simplifies the database backup and recovery process by providing a user-friendly interface with guided steps for executing backups and restores. It offers options to configure backup settings such as choosing the database, destination path, and backup type, streamlining the process and reducing the need for extensive manual intervention. Additionally, it provides prompts and confirmations at each step to ensure accuracy and completeness of the operations .

When removing an existing destination path for a backup, it is crucial to ensure that the new path is valid and secure, with adequate storage capacity. Verify that the destination path is accessible and protected against unauthorized access to prevent data breaches. Additionally, document the new path and any changes made to provide a reliable reference for future backups and restores, reducing the risk of misplacement or data loss .

The 'Tasks' function in SQL Server Management Studio serves as a critical component for performing database backup operations. It provides a straightforward pathway to access backup functionalities by allowing users to right-click on the database object, select Tasks, and then choose Backup. This feature simplifies navigation through the backup process and centralizes all related options for configuring and executing database backups within one section .

Setting a proper file name and location for a database backup is vital for organizational and retrieval purposes. A meaningful file name helps in easily identifying the backup and its contents, reducing errors during restoration. Correctly setting the file location ensures that the backup is stored in a secure and reliable spot, making it readily accessible when needed for recovery. This practice supports efficient data management and minimizes risks related to data recovery .

Selecting an incorrect backup file during restoration can result in data inconsistency if the backup does not match the current database state or requirements. It might lead to restoring outdated or irrelevant data, causing a loss of recent transactions and potentially disrupting business operations. Careful verification of backup file details prior to restoration is crucial to avoid these issues .

You might also like