Thursday, October 1, 2020

Auto Database Backup to Drive


--exec usp_DataBaseBackupgHRM  

CREATE Procedure [dbo].[usp_DataBaseBackupgHRM]  

As  

Begin  

 Declare @BackUpname varchar(255)  

   

  Select @BackUpname='S:\gHRMDBBackup\gHRM_'+RTRIM(LTRIM(Convert(Varchar(50),Getdate(),112)))+'.BAK'  

  BACKUP DATABASE gHRM  

  TO DISK = @BackUpname  

  WITH INIT  

End  

No comments:

Post a Comment

Screen Record

 Windows Screen Record WindowsKey+ Alt + R Recording Starts.