Last active
February 12, 2020 15:05
-
-
Save mtellin/4b632439a214c4f53215023ef49cf796 to your computer and use it in GitHub Desktop.
Workflow for walking through an item level recovery with Rubrik for SQL Server database.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Show files | |
SELECT name, physical_name AS current_file_location,(size *8) /1024 AS size_MB | |
FROM sys.master_files | |
-- Good data | |
SELECT * FROM AdventureWorks2014.Sales.SalesPersonQuotaHistory; | |
-- Uh oh.... | |
DELETE FROM AdventureWorks2014.Sales.SalesPersonQuotaHistory; | |
-- It's gone all right | |
SELECT * FROM AdventureWorks2014.Sales.SalesPersonQuotaHistory; | |
-- Show files | |
SELECT name, physical_name AS current_file_location,(size *8) /1024 AS size_MB | |
FROM sys.master_files | |
-- Restore time | |
INSERT INTO AdventureWorks2014.Sales.SalesPersonQuotaHistory | |
SELECT * FROM LM_Demo.Sales.SalesPersonQuotaHistory; | |
-- Thanks, Rubrik! | |
SELECT * FROM AdventureWorks2014.Sales.SalesPersonQuotaHistory | |
-- Empty the Messages window for the next run | |
SET NOCOUNT ON |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment