where does bcp import data into ?

Answered where does bcp import data into ?

  • jeudi 2 août 2012 08:57
     
     

    I want to import a big file into the database table admininfo using bcp. While bcp is running, I query count(*) from admininfo at the database, the result is 0.  but bcp is printing the log like 'Total sent : xxxxxx'.

    where does bcp import data into ? tempdb?  even when I set transaction isolation level to 'read uncommitted', I still get 0 rows before bcp finishes.



    • Modifié mq44944 jeudi 2 août 2012 09:20
    •  

Toutes les réponses

  • jeudi 2 août 2012 11:59
     
     Traitée

    on the bcp command have you set the -b this determines the batch size.  If you do not set this parameter then it will treat the import as one batch (it will need to be less than the number of rows you import).

    Also try to use sp_spaceused tablename on the table as you import and see if this increments as the import is running rather than the select count(*), your table may be locked while it does the import.


    • Modifié Jase74 jeudi 2 août 2012 12:00
    • Proposé comme réponse Jase74 jeudi 2 août 2012 13:56
    • Marqué comme réponse amber zhangModerator lundi 13 août 2012 01:26
    •