Import to Database failed

  • Hi SQLServer professionals,

    I am using SQL Server 2000

    And i am trying to import a huge table into db from text file which contains 55lacs records.

    Some times i am getting General Network error, sometimes get Locks error.

    SQL server cant resolve locks. Contact your sys admin.

    Locks are set to '0' in sp_configure,

    I increased it to 10000 then to 20000 but still those error was getting me.

    What should i do.

    We have to launch this compaign tommorrow.

    Please help me.

    [font="Verdana"]Regards,

    Pritam Salvi
    SQL DBA
    Mumbai. India[/font]

  • if you have a problem locks then you can try to run this batch by batch such 1000,2000,3000,etc.

    you can use the bcp utility to achive this.

  • How to do that

    Because i am new to SQL Server.

    [font="Verdana"]Regards,

    Pritam Salvi
    SQL DBA
    Mumbai. India[/font]

  • please refer the following link

    http://databases.about.com/od/sqlserver/a/bcp.htm

    Hope this help.

  • Hey Thanks,

    BCP utility didnt work for me,

    But i did it from Bulk insert & its worked for me.

    Yesterday i started & within 5mins its completed while it was taking so much time for DTS & generating locks.

    Thanks once againg for helping me.

    This blog is so nice.

    [font="Verdana"]Regards,

    Pritam Salvi
    SQL DBA
    Mumbai. India[/font]

  • This is query which worked for me

    BULK INSERT School_Lester.dbo.dbo_valCity

    FROM 'D:\valCitynew.txt'

    WITH

    (

    BATCHSIZE = 1000 ,

    DATAFILETYPE = 'char' ,

    FIELDTERMINATOR = ',' ,

    ROWTERMINATOR = '',

    MAXERRORS = 50 ,

    TABLOCK )

    Thanks,

    Pritam Salvi

    Database Administrator

    Lester Infoservices

    Navi Mumbai. India.

    [font="Verdana"]Regards,

    Pritam Salvi
    SQL DBA
    Mumbai. India[/font]

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

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