|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 8:17 AM
Points: 218,
Visits: 433
|
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Yesterday @ 4:26 PM
Points: 2,388,
Visits: 555
|
|
When I'm running scripts like this I make sure that the failure notices print ****FAILURE as this standard out like a sore thumb when the output is echoed to a file.
The other thing to consider is whether a RAISERROR would be a good idea because if you run it using SQLCMD.EXE then this allows the windows command file to make use of %ERRORLEVEL%.
It depends on what you want to do. In some cases I want the script to work through reporting all errors. In others I want the process to terminate at the first sign of an error.
======================== You will have someones eye out with that. King Harold
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 11:34 AM
Points: 188,
Visits: 1,493
|
|
| What I liked about this article was the trick for search and replace using the IDE. The way I do it could not be used by most people, and I couldn't figure out how everyone else does it. Until now, I figured that most people probably just don't bother to clean up names. Now I see that other people have a way to do it. Thanks for showing that.
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, September 02, 2009 1:24 AM
Points: 2,
Visits: 16
|
|
Hi Andy, Interesting read! One this I would like to inform you that when pushing the results to text through your AutoGen scripts the generated scripts were getting truncated to 256 chars. For those ignorant of this limitation including me :) this can be rectified by going to Tools --> options --> Query Results --> SQL Server --> Results to text and setting "Maximum number of characters displayed in each column" to something higher like 1000.
I hope my 2 cents worth would help someone.
Keep up the good work.
Cheers,
Hemal
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 8:17 AM
Points: 218,
Visits: 433
|
|
Thanks Hemal!
I completely forgot to include that in the article.
:{> Andy
Andy Leonard
|
|
|
|