DECLARE @BackupFileName NVARCHAR(500);
SET @BackupFileName = N'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Backup\MiaoYu-' 
                      + FORMAT(GETDATE(), 'yyyyMMdd_HHmmss') 
                      + '.bak';

BACKUP DATABASE [MiaoYu] 
TO DISK = @BackupFileName 
WITH NOFORMAT, NOINIT, NAME = N'MiaoYu-完整 数据库 备份', SKIP, NOREWIND, NOUNLOAD, STATS = 10;
GO
