POINT IN TIME RECOVERY
Below points are disscussing about point in time recovery of data in the Database
1)Create a database in the SQL Server Management Studio. Here i created a database named as New.
2)Create a table and Insert the data into that table. You can run the below query for creating table and insert the data into it.
Use New
GO
CREATE TABLE TestForBackupNew
(Sno INT IDENTITY(1,1),Valuess INT)
GO
DECLARE @I INT
DECLARE @Count INT
SET @I=1001
SET @Count=2000
WHILE(@I<@Count)
BEGIN
INSERT INTO TestForBackupNew
(Valuess)
SELECT @I
SELECT @I=@I+1
END
SELECT * FROM TestForBackupNew
3)After Creating table and Inserting the data into it take FULL Backup and Transaction Log Backups.
4)Now delete the data from table.
DELETE FROM TestForBackupNew
WHERE SNO BETWEEN 1 AND 68---68 Rows affected
5)Change Database to Master
6)Restore the Database by choosing overwrite existing database.
7)Write Select Query and you can find the deleted data.
1)Create a database in the SQL Server Management Studio. Here i created a database named as New.
2)Create a table and Insert the data into that table. You can run the below query for creating table and insert the data into it.
Use New
GO
CREATE TABLE TestForBackupNew
(Sno INT IDENTITY(1,1),Valuess INT)
GO
DECLARE @I INT
DECLARE @Count INT
SET @I=1001
SET @Count=2000
WHILE(@I<@Count)
BEGIN
INSERT INTO TestForBackupNew
(Valuess)
SELECT @I
SELECT @I=@I+1
END
SELECT * FROM TestForBackupNew
3)After Creating table and Inserting the data into it take FULL Backup and Transaction Log Backups.
4)Now delete the data from table.
DELETE FROM TestForBackupNew
WHERE SNO BETWEEN 1 AND 68---68 Rows affected
5)Change Database to Master
6)Restore the Database by choosing overwrite existing database.
7)Write Select Query and you can find the deleted data.
Comments