Click here to Skip to main content
13,093,097 members (64,901 online)
Rate this:
Please Sign up or sign in to vote.
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

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 4-Apr-13 21:02pm
Updated 4-Apr-13 21:16pm
ryanb31 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 5 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100