Re: Ignoring Errors

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



OSQL is better than Agent TSQL as OSQL doesn't terminate on errors. However, for some errors, *SQL
Server* terminates the batch. I suggest you check out the articles on error handling at
www.sommarskog.se.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/


<googlemike@xxxxxxxxxx> wrote in message
news:1113236973.134465.132330@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>I have some "best effort" jobs that try at various times to walk over
> missed records from one system to another about 5 times. After that,
> the data becomes stale and is no longer usable, so I have another
> process that comes after that to investigate the problem.
>
> The problem I'm having is that when my best effort jobs ran in MS SQL
> Server, they would run and then bomb out immediately. I want it instead
> to just continue on error.
>
> Meanwhile, I then switched the jobs to osql.exe and Task Scheduler this
> weekend. The results were exactly the same -- the job dies on error.
>
> Can you help me figure out a way either for osql.exe to continue on
> error, or for me to ignore all stored procedure errors and just keep on
> continuing?
>
> I'm used to VB's "on error resume next" and unfortunately I don't see
> one in MS SQL Server. This is absurd!
>


.



Relevant Pages

  • Re: SQL 2005 Trying to run jobs owned by the NT AUTHORITY SYSTEM user.
    ... running on the SQL 2005 system. ... I am trying to get the SQL agent jobs to ... run as the local NT_AUTHORITY\System account. ... TransactionLogMaintenance.Subplan_1 does not have server access." ...
    (microsoft.public.sqlserver.server)
  • SQL 2000 Email issue
    ... SQL 2000 Developers Editon 8.00.2050 on my Windows XP Pro workstation ... SQL 2000 Server Standard Edition 8.00.2050 on my ... The SQL Agent on both have been configured with the Mail profile. ... On Server 1 My workstation I have maintainance plans setup and the jobs run ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL 2000 Email issue
    ... SQL 2000 Developers Editon 8.00.2050 on my Windows XP Pro workstation ... SQL 2000 Server Standard Edition 8.00.2050 on my ... The SQL Agent on both have been configured with the Mail profile. ... On Server 1 My workstation I have maintainance plans setup and the jobs ...
    (microsoft.public.sqlserver.setup)
  • Failed to notify DBA via email
    ... We have some SQL jobs those run on a schedule basis. ... notify us via email in case of job fails. ... of mail server was not available but our exchnage server admin has looked at ...
    (microsoft.public.sqlserver.server)
  • xp_cmdshell and vb programs and SQL Server 2000
    ... Does anyone have any issues with xp_cmdshell with SQL ... Server 2000 on Windows 2000 Server? ... terminate if run from the DOS prompt. ...
    (microsoft.public.sqlserver.programming)