Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

So, I've created a SQL Server Agent job, according to the answer to my prev question:

General

Advanced

enter image description here

running nightly (at 2:11) according to the schedule:

Nightly Schedule

There are 9 .bak files in 3 subdirectory of d:\backup\ source folder, 3 old bakup files are being deleted and 3 new is being created by another preceding SQL Server Agent job.

The described here job copy-purges files but... what the heck the history of this Copy&Purge BAKs SQL ServerAgent job shows 96 items:

enter image description here

How to make it less verbose?

Eventvwr.msc doesn't contain any eroors for the corresponding period of time (of job run).

UPDATE:

So, I've made these changes

enter image description here

and it seems it simply truncates a per-job log:

enter image description here

share|improve this question

3 Answers 3

up vote 1 down vote accepted

not sure if you just wanted to reduce the number of rows shows up there or actually want SQL server Agent not to log that much of data. but if it is to limit the number of rows to log per job and/or total in job history then you can set those from SSMS as shown below.

enter image description here

share|improve this answer
    
Thanks, changed "per job" to 20 (from 100) Shall see the results tomorrow, I hope it will be proportional and not just truncate after 20% of job processing –  Gennady Vanin Novosibirsk Oct 16 '13 at 8:30

If I understand correctly, the job step history is recording all of the output from the robocopy command. How about adding suppression arguments to the command line? From the Robocopy topic on TechNet:

/ns  -- Specifies that file sizes are not to be logged.
/nc  -- Specifies that file classes are not to be logged.
/nfl -- Specifies that file names are not to be logged.
/ndl -- Specifies that directory names are not to be logged.
/np  -- Specifies that the progress of the copying operation (the number 
        of files or directories copied so far) will not be displayed.
share|improve this answer
    
I do not see that "file sizes", "file names", "dir names" or "the number of filesor directories copied so far" are being logged. Just to note that other SQL Server Agent jobs (that execute maintenance plans) have no more than a single record per SQL Server Agent job step –  Gennady Vanin Novosibirsk Oct 16 '13 at 8:27
    
@ГеннадийВанинНовосибирск well, I can't really tell from your screen shot what is or isn't being logged. I was merely showing you all of the ways you can suppress output. –  Aaron Bertrand Oct 16 '13 at 10:51

Perhaps you need to uncheck this:

enter image description here

The job step properties screen allows you to prevent the output from the job being recorded in the job history.

share|improve this answer
    
I really need this output especially for new or fresh modified jobs...as well as for old ones –  Gennady Vanin Novosibirsk Oct 16 '13 at 8:28
    
Unchecking this option will only impact the job that you do it on. So you need to either do that or add the /np option from the answer above to limit the amount of output from robocopy. –  georgeb_dba Oct 17 '13 at 12:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.