Ok, here we are - SQL 2008 SP1 64-bit cluster Ent. Edition
I'm using 'Execute T-SQL Task' instead of the 'Backup Database Task' (well, I need MIRROR TO in my backup statements).
The script below should backup all the databases:
DECLARE db_cursor CURSOR FOR
SELECT name
FROM sys.databases
WHERE state_desc = 'ONLINE'
AND user_access_desc = 'MULTI_USER'
AND name NOT IN ('tempdb')
OPEN db_cursor
FETCH NEXT FROM db_cursor INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
BACKUP DATABASE @name TO DISK = @fileName MIRROR TO DISK=@mirror_fileName WITH FORMAT, COMPRESSION, CHECKSUM
FETCH NEXT FROM db_cursor INTO @name
END
CLOSE db_cursor
DEALLOCATE db_cursor
To make it short - after the new DB is created, the Maint Plan does not backup it (no errors, T-SQL step completed successfully etc.). The script itself works fine, if executed separately.
The question is - do we have some kind of cache for the Maint Plans, that stores T-SQL step results somewhere?
To be honest - it looks like a bug to me. Any ideas?