TRUNCATE TABLE master..sysdatabases

...and other neat SQL Server tricks
posts - 56, comments - 60, trackbacks - 14

February 2010 Blog Posts

Fixing Robocopy for SQL Server Jobs

Robocopy is one of, if not the, best life-saving/greatest-thing-since-sliced-bread command line utilities ever to come from Microsoft.  If you're not using it already, what are you waiting for? Of course, being a Microsoft product, it's not exactly perfect. ;)  Specifically, it sets the ERRORLEVEL to a non-zero value even if the copy is successful.  This causes a problem in SQL Server job steps, since non-zero ERRORLEVELs report as failed. You can work around this by having your SQL job go to the next step on failure, but then you can't determine if there was a genuine error.  Plus you still see annoying...

posted @ Wednesday, February 17, 2010 3:05 PM | Feedback (2) | Filed Under [ Coolness Command Line ]

Powered by:
Powered By Subtext Powered By ASP.NET