Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #763
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Erland Sommarskog <esquel@sommarskog.se> |
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | Re: SQL Agent job RAISEERROR roll-up |
| Date | Mon, 31 Oct 2011 22:43:03 +0100 |
| Organization | Erland Sommarskog |
| Lines | 25 |
| Message-ID | <Xns9F8FE71831DYazorman@127.0.0.1> (permalink) |
| References | <e5f0f35a-1624-40ff-aff9-877c1156d5bd@a12g2000vbz.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | mx04.eternal-september.org; posting-host="nBFDv6s1VJQDuF1w6hpX2A"; logging-data="2013"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hEBdNHtc+EeXT+21gwi+q" |
| User-Agent | Xnews/2006.08.24 Mime-proxy/2.1.c.0 (Win32) |
| Cancel-Lock | sha1:39lvcbIOREYg4LFohCrttWKbduQ= |
| Xref | x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:763 |
Show key headers only | View raw
JAW (jwilliam@aglresources.com) writes: > I have and SPROC that calls the below via a cursor so parameters can > be based from a table. > > When in run it in SSMS it gives the desired results. Any file that > errors it it continues on to the next which is what I want. > > When I take the caller of the below and put it in a SQL Agent job it > dies on the first error. > > Somehow the RAISEERROR percolates to the top of the stack and stops > the job. This seems familiar; When Agent notices that the job raises and error, it sends an attention signal to SQL Server to cancel execution. I don't know of any way to change this behaviour. I think your best bet is to log the errors in a table, and then raise an error at the end. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Links for SQL Server Books Online: SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
Back to comp.databases.ms-sqlserver | Previous | Next — Previous in thread | Next in thread | Find similar
SQL Agent job RAISEERROR roll-up JAW <jwilliam@aglresources.com> - 2011-10-31 11:51 -0700
Re: SQL Agent job RAISEERROR roll-up Erland Sommarskog <esquel@sommarskog.se> - 2011-10-31 22:43 +0100
Re: SQL Agent job RAISEERROR roll-up JAW <jwilliam@aglresources.com> - 2011-11-01 07:02 -0700
Re: SQL Agent job RAISEERROR roll-up JAW <jwilliam@aglresources.com> - 2011-11-01 09:39 -0700
Re: SQL Agent job RAISEERROR roll-up Erland Sommarskog <esquel@sommarskog.se> - 2011-11-01 22:17 +0100
csiph-web