数据库备份脚本
--CompanyPlus 点8
declare @dataBaseName nvarchar(50) = 'CompanyPlus'
declare @bakPath nvarchar(1000)
set @bakPath = '''D:\\Database\\Bak\\' + @dataBaseName + '\\' + @dataBaseName + '_' + REPLACE(CONVERT(nvarchar, getdate(), 23), '-', '_') + '.bak'''
exec ('BACKUP DATABASE [' + @dataBaseName + '] to disk = ' + @bakPath)