sqlserver数据库备份分割

DECLARE @CurrentTime VARCHAR(50),

@FileName1 VARCHAR(200),

@FileName2 VARCHAR(200)
SET @CurrentTime = REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR, GETDATE(), 120 ),'-','_'),' ','_'),':','') 
SET @FileName1 = 'C:\test\Data_Backup_Partial1_' + @CurrentTime+'.bak'
SET @FileName2 = 'C:\test\Data_Backup_Partial2_' + @CurrentTime+'.bak'
BACKUP DATABASE [数据库名] TO DISK=@FileName1,DISK=@FileName2 WITH FORMAT

完整备份文件过大,可将备份文件分割为多个

你可能感兴趣的:(数据库,sqlserver,oracle)