Direction of logs generated from Maintenance Plans  
Author Message
ayesha_ahsan88





PostPosted: Top

SQL Server >> Direction of logs generated from Maintenance Plans

SQL Server 2005 SP2: I've created a maintenance plan that backs up
transaction logs. I added a simple T-SQL step before and after the log
backup using the SSIS window when modifying the maintenance plan. For the
purposes of testing, it executes a simple Print statement which convenient
displays in the log.

I executed the corresponding updated job and the log output is below. It
appears that the last step is listed first, and the first step is displayed
at the bottom, implying that the log is appended to at the top??

I'm confused. I can only assume this is by design? Why is the order not
consistent with logs like IIS logs, or the cronological SQL Server logs?

Thanks,
Mark
-----
NEW COMPONENT OUTPUT
Microsoft(R) Server Maintenance Utility (Unicode) Version 9.0.3042
Report was generated on "MyServer".
Maintenance Plan: Mark Test 20080401
Duration: 00:00:00
Status: Succeeded.
Details:
Execute SUCCESS T-SQL (MyServer)
Execute TSQL on Local server connection
Execution time out: 0


Task start: 2008-04-15T13:27:05.
Task end: 2008-04-15T13:27:05.
Success
Command:Print ''SUCCESS - End of Log Backup - Mark''

Back Up Database (Transaction Log) (MyServer)
Backup Database on Local server connection
Databases: MyDb
Type: Transaction Log
Append existing
Task start: 2008-04-15T13:27:05.
Task end: 2008-04-15T13:27:05.
Success
Command:EXECUTE master.dbo.xp_create_subdir N''D:\SQL\Backups\MyDb''
GO
BACKUP LOG [MyDb] TO DISK =
N''D:\SQL\Backups\MyDb\MyDb_backup_200804151327.trn'' WITH RETAINDAYS = 14,
NOFORMAT, NOINIT, NAME = N''MyDb_backup_20080415132705'', SKIP, REWIND,
NOUNLOAD, STATS = 10
GO


database_name=N''MyDb'' and backup_set_id=(select max(backup_set_id) from
msdb..backupset where database_name=N''MyDb'' )

for database ''''MyDb'''' not found.'', 16, 1) end
RESTORE VERIFYONLY FROM DISK =
N''D:\SQL\Backups\MyDb\MyDb_backup_200804151327.trn'' WITH FILE =
@backupSetId, NOUNLOAD, NOREWIND


Begin T-SQL (MyServer)
Execute TSQL on Local server connection
Execution time out: 0
Task start: 2008-04-15T13:27:04.
Task end: 2008-04-15T13:27:04.
Success
Command:Print ''Begin Log Backup - Mark''

SQL Server164