×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

SQL Server bcp question. Please help.

A table 'testBulkInsert ' with 2 columns, a few char each row. a few rows text data file 'trybulk.txt ', and a format file 'trybulk.fmt ' for the table. use bcp I successfully insert the data file into the table.

However, I use the same method to deal with large data file, it fails, anyone know why and how deal with it?
The table 'Temp ' with 120 columns, total more than 530 char each row. A large number of rows text data file 'trydata.txt ' is needed to insert into the table. 'Temp.fmt ' is the famat file.
-------------------------------------

C:\>bcp aaa.amy.testBulkInsert in trybulk.txt -f trybulk.fmt -Sdrdb -Uadmin1
-Padmin1

Starting copy...

4 rows copied.
Network packet size (bytes): 4096
Clock Time (ms.): total 47

C:\>bcp aaa.amy.Temp in trydata.txt -f Temp.fmt -SDRDB -Uadmin1 -P
admin1
SQLState = 28000, NativeError = 18456
Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'CO
RP\amy'.

C:\>
Report

Replies, comments and Discussions:

  • 工作学习 / 专业技术讨论 / SQL Server bcp question. Please help.
    A table 'testBulkInsert ' with 2 columns, a few char each row. a few rows text data file 'trybulk.txt ', and a format file 'trybulk.fmt ' for the table. use bcp I successfully insert the data file into the table.

    However, I use the same method to deal with large data file, it fails, anyone know why and how deal with it?
    The table 'Temp ' with 120 columns, total more than 530 char each row. A large number of rows text data file 'trydata.txt ' is needed to insert into the table. 'Temp.fmt ' is the famat file.
    -------------------------------------

    C:\>bcp aaa.amy.testBulkInsert in trybulk.txt -f trybulk.fmt -Sdrdb -Uadmin1
    -Padmin1

    Starting copy...

    4 rows copied.
    Network packet size (bytes): 4096
    Clock Time (ms.): total 47

    C:\>bcp aaa.amy.Temp in trydata.txt -f Temp.fmt -SDRDB -Uadmin1 -P
    admin1
    SQLState = 28000, NativeError = 18456
    Error = [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'CO
    RP\amy'.

    C:\>
    • up