Friday 18 December 2020

Restoring a Backup after Loss of data

I have created a table named rakesh, then I added few records and took a backup. Accidently, I deleted data. I will recover data from my Backup. 
---------------------------------------------------------------------------------------------------------------

Lets start from very first step.
First, create a table rakesh.

And then, I have added three rows in the table.

Lets query the table.

Now, I am going to take a backup and delete the data. Click on the database > Tasks > Backup

Here, we need to specify the destination location for our backup. In the destination section, click Add button and in new window in file name click ... and select folder where I want my backup to be taken.
I have selected D:\BlogPost\Backup and Recovery\ and my file name rakesh_table_backup and press ok.



Backup done successfully.

Now, we will remove some data form table rakesh. 
truncate table rakesh;
I have deleted all the records from the table. 
Now, we will restore the database to recover our data from the table rakesh. We need to go to Task > Restotre > Database. We can see when the last backup was taken. press Ok.



Backup has been restored successfully. 


Now, we need to check our data in table rakesh.


Yes, our data is RESTORED. 
---------------------------------

No comments:

Post a Comment

MS SQL Server and its Editions.

Microsoft SQL Server  Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a ...