errors in jobs with sql sevierity

  • Hi everyone,

    In one of my sql jobs,when i open job history a job scheduled for 30 mins is having sqlstate:42000 and error 50000 with sql sevierity 16

    so what could be the best resolution to over come this???????/

    Thanks,for reading

  • Error 50000 is a custom error. Somewhere in the job code a RAISERROR ran. Look through the code, see where it's run and why.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Can you post more information on what the job does?

  • GilaMonster:

    thks for the reply can u please give some more info on this because am new on this field.

  • There's no more info I can give you. Error 50000 is NOT a SQL built in error. It comes from a RAISERROR somewhere in the job code or code that the job is calling. You are going to have to trace through what the job does and locate the source.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster :but how can we trace wht the job does?

  • Open it up and read through the code

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • GilaMonster:thanks for you responses,am new to sql though sooo my questions may not have expected strandards.So am going through the code of each job and trying to find out a word called "RAISEEROR"

    will it help?

    Thanks a ton again

  • Why read every job? One job has failed, that job is the one you should be investigating. Looking at ones that haven't failed is just a waste of time.

    Honestly, I'd start by speaking to the developers (assuming this is an in-house system)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • you should execute the code on query analyzer for the error , if you cant do this then use TRY and CATCH the error and insert in a table

    Begin Try

    your Code

    End Try

    Begin Catch

    insert into Table abc

    End Catch

    http://msdn.microsoft.com/en-us/library/ms175976.aspx

    http://msdn.microsoft.com/en-us/library/ms179296.aspx

    Regards,
    Syed Jahanzaib Bin Hassan
    BSCS | MCTS | MCITP | OCA | OCP | OCE | SCJP | IBMCDBA

    My Blog
    www.aureus-salah.com

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply