Unexcpted erorrs restoring large tables

  • Hi

    Please excuse me if this is a basic question,

    I have been given a .sql file which has a script to create and insert data into a table. The script around 100,000 records in it.

    Most of the content is in the form

    'Insert into table ....'

    'insert into table ...'

    GO

    Insert into table ....'

    'insert into table ...'

    I am using the SQLCmd utility to execute this script , and it seems to be giving errors at different stages trying to insert data.

    It does appear the data size and number of rows is  impacting how things work, as the same works fine for smaller amount of data ( in size and number of rows)

    1 ) Is there a better way to do this, by supplying some kind of parameter to SQLCmd  ?

    2) Any other way to execute a giant SQL script, with Lot of data , without erroring out ?

    Thanks for any pointers

    Best Regards

  • What are the exact errors that you're seeing? (Copy'n'Paste, please)

     

     

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • What are the errors you receive with the large script?

  • The table contains error message numbers and the description, which is the text of the error message from the sys.messages catalog view. Where applicable, the error number is a link to further information DGCustomerFirst

    • This reply was modified 1 year, 2 months ago by  Buvelot.
  • Buvelot wrote:

    The table contains error message numbers and the description, which is the text of the error message from the sys.messages catalog view. Where applicable, the error number is a link to further information.

    Even if that did apply here (pretty sure it doesn't because SQLCmd writes errors to the screen unless directed to write them to a table or file), we're asking the OP to copy'n'paste the errors they're getting so we can actually help the OP figure out what's going wrong.

    Based on the over-generalized nature of your post, I'm thinking that a SPAM test was just completed.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".
    "Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 5 posts - 1 through 5 (of 5 total)

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