This file contains hidden or 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
DECLARE @name NVARCHAR(256) -- database name | |
DECLARE @path NVARCHAR(512) -- path for backup files | |
DECLARE @fileName NVARCHAR(512) -- filename for backup | |
DECLARE @fileDate NVARCHAR(40) -- used for file name | |
-- specify database backup directory | |
SET @path = 'C:\test\' | |
-- specify filename format | |
SELECT @fileDate = CONVERT(NVARCHAR(20),GETDATE(),112) |