USE PKZP;
GO
DECLARE @CurrentName varchar(10)
SELECT @CurrentName = CONVERT(VARCHAR(10), GETDATE(), 102)
DECLARE @FileName varchar(255)
SET @FileName = 'g:\Kopia\PKZP_' + @CurrentName + '.Bak'
BACKUP DATABASE PKZP
TO DISK = @FileName
WITH FORMAT,
STATS = 10,
MEDIANAME = ' PKZP_Backup',
NAME = 'Pelny backup bazy PKZP';
GO