Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Output Whitespace in Agent Job Log File

Author  Topic 

rbarlow
Starting Member

26 Posts

Posted - 2010-11-30 : 17:30:58
This is kind of a silly post but I can't for the life of me figure out a way to do this. For some reason all blank lines in the job log file get removed.

For example, the following script:

print '1 ---------------------'
print ''
print char(13) + char(10)
print char(13) + char(10) + char(13) + char(10) + char(13) + char(10) + char(13) + char(10) + char(13) + char(10)
print '2 ---------------------'
print '3 ---------------------'

Outputs the following log:

Job 'Test' : Step 1, 'test' : Began Executing 2010-11-30 11:43:38

1 --------------------- [SQLSTATE 01000]
2 --------------------- [SQLSTATE 01000]
3 --------------------- [SQLSTATE 01000]

At this point I'm more curious then anything about whether this is possible. If not I guess I'm stuck with added an extra line of dashes... but its not ideal.

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-12-01 : 04:50:00
How are you viewing the log file and where are you getting it from?
I tend to not do this sort of hting because it can truncate and make it difficult to get errpr info.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -