Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.
Code for RestoreDatabase
EXEC [dbo].[RestoreDatabase] '_db_200508070216' , '\\Vboxsvr\x_drive\_db_200508070216.BAK'
GO /****** Object: StoredProcedure [dbo].[RestoreDatabase] Script Date: 11/10/2014 13:07:13 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[RestoreDatabase] -- Add the parameters for the stored procedure here @dataBaseNameVarchar as varchar(250), @bakPathVarchar as varchar(max) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; execute( 'create database [' + @dataBaseNameVarchar + ']') execute(' ALTER DATABASE [' + @dataBaseNameVarchar + '] SET SINGLE_USER WITH ROLLBACK IMMEDIATE') execute(' RESTORE DATABASE [' + @dataBaseNameVarchar + '] FROM DISK = ''' + @bakPathVarchar + ''' WITH REPLACE, RECOVERY') execute('ALTER DATABASE [' + @dataBaseNameVarchar + '] SET MULTI_USER') END
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.