Click here to Skip to main content
15,868,039 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've build an application in Visual Studio 2010, and using SQL 2008 to create database. In my pc while generating script i'm using BCP command to export data from SQL 2008 and i can easily generate.

But facing problem in client PC, i've installed SQL 2005 in that pc as it is a free version. While executing the BCP command i am getting this following error

VB
SQLState = 37000, NativeError = 4060
Error = [Microsoft][SQL Native Client][SQL Server]Cannot open database "MyDB" requested by the login. The login failed.
SQLState = 28000, NativeError = 18456
Error = [Microsoft][SQL Native Client][SQL Server]Login failed for user 'Server-PC\Server'.


I can't understand why the BCP command unable to connect database, while i'm using SQL management studio to connect the database with same id and password i can easily access the database.
I'm using this following command which executes successfully in SQL 2008, but showing the above error in SQL 2005

bcp MyDB.dbo.table out D://backup//script.bcp -c -t, -T -U sa -P password -S Server-PC\Server



Googled a lot, but did't get exact solution. Please help me to sort this.
Thanks in advance.
Posted
Updated 4-Apr-13 21:16pm
v2
Comments
ZurdoDev 5-Apr-13 7:57am    
I have never seen a login error be anything other than a login issue.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900