Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    193

    Unanswered: Import Script Keeps Blowing Up

    Hi all,

    This is a conceptual question to start with. I have a co-worker having trouble w/ an import script. He is pulling in data from an old AS400 system into SQL Server 2008. It works for a few hours then blows up somewhere for different reasons, ie field in an incoming table is too long, connection timed out, etc. He is asking me if there is a way to tweak his script which I don't have just yet to use some error handling, document the error, and then just move onto the next table to import so we don't have to babysit this thing. Is this possible? Should I look into @@Error?

    ddave

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    If the script is in T-SQL then use TRY...CATCH. @@ERROR is legacy crap from SQL2k minus - it did not allow error handling but only some error detection and post error conditional control flow. I don't think I have used @@ERROR once since moving on to SQL Server 2005 plus.
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Feb 2004
    Posts
    193
    Yes, it is in T-SQL, I got a glimpse of it. Ok, I will give it a TRY.........pun intended.

    Once again you guys prove this is the best sql server forum out there.

    Thanks, I'll get back to you later when I get into work today.

    Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •