开发者

bcp error when importing data

开发者 https://www.devze.com 2023-02-08 08:20 出处:网络
C:>bcp dbo.[item] in \'C:\\item.txt\' -n -T -S\"A-9\"开发者_Go百科 i am using this command, to copy the data from item.txt file into an item table.

C:>bcp dbo.[item] in 'C:\item.txt' -n -T -S"A-9"开发者_Go百科

i am using this command, to copy the data from item.txt file into an item table. but i get the error as:

SQLState = 37000, NativeError = 4060 Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot open databa se "dbo" requested by the login. The login failed. SQLState = 28000, NativeError = 18456 Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for u ser 'A-9\Admin'.

my host name is A-9. but i am not sure about the username.how do i get it


Add the name of you database before dbo.[item]. YourDbName.dbo.[item]


Try delimiting the table switch or adding the -d switch

bcp dbo.item in "C:\item.txt" -n -T -S"A-9" -d MyDB

bcp MyDB.dbo.item in "C:\item.txt" -n -T -S"A-9"
0

精彩评论

暂无评论...
验证码 换一张
取 消