I have a maintenance plan that is failing on one backup. I went into look at the t-sql code and it shows a space after the database name. I copied the t-sql code to a query window | removed the spaces and the backup ran fine. My question is how do
I remove the spaces for this one backup. The other servers in the maintenance plan work fine.
Note: I copied this part out so you can see "N'T:\SQL Backup\PackagingForms \" I removed the space after PackagingForms and it worked!
EXECUTE master.dbo.xp_create_subdir N'T:\SQL Backup\PackagingForms '
BACKUP DATABASE [PackagingForms ] TO DISK = N'T:\SQL Backup\PackagingForms \PackagingForms _backup_201010281050.bak' WITH NOFORMAT, NOINIT, NAME = N'PackagingForms _backup_20101028105056', SKIP, REWIND, NOUNLOAD, STATS = 10
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'PackagingForms ' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'PackagingForms ' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database 'PackagingForms ' not found.', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N'T:\SQL Backup\PackagingForms \PackagingForms _backup_201010281050.bak'
View Complete Post