×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

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