Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: SQL-server-2005
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 22:02pm
Edited 4-Apr-13 22:16pm
v2
Comments
ryanb31 at 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
0 OriginalGriff 280
1 Jochen Arndt 150
2 Kornfeld Eliyahu Peter 120
3 PIEBALDconsult 110
4 Richard MacCutchan 105
0 OriginalGriff 6,055
1 DamithSL 4,621
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,500
4 Sergey Alexandrovich Kryukov 3,294


Advertise | Privacy | Mobile
Web03 | 2.8.141220.1 | Last Updated 5 Apr 2013
Copyright © CodeProject, 1999-2014
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