dbTalk Databases Forums  

BCP and SQL Azure

microsoft.public.sqlserver.tools microsoft.public.sqlserver.tools


Discuss BCP and SQL Azure in the microsoft.public.sqlserver.tools forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lilian
 
Posts: n/a

Default BCP and SQL Azure - 04-26-2010 , 05:18 AM






Hi,

I have the following error when trying to connect to SQL Azure using BCP:
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed
for u
ser 'MYUSER'.

The command line used is:
bcp.exe "MYDATABASE.dbo.MYTABLE" out "C:\temp\test.tmp" -E -q -n -S
MYSERVER.database.windows.net -U MYUSER@MYSERVER

The error message appears when entering the password on the following prompt.

Please note that on the same computer, connecting to SQL Azure with VS 2010
or VSTS 2008 R2 SSMS works fine.

Can anyone help?

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: BCP and SQL Azure - 04-26-2010 , 06:22 AM






Lilian (Lilian (AT) discussions (DOT) microsoft.com) writes:
Quote:
I have the following error when trying to connect to SQL Azure using BCP:
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed
for user 'MYUSER'.

The command line used is:
bcp.exe "MYDATABASE.dbo.MYTABLE" out "C:\temp\test.tmp" -E -q -n -S
MYSERVER.database.windows.net -U MYUSER@MYSERVER

The error message appears when entering the password on the following
prompt.
You can also specify password with -P.

The problem may be that SQL Azure does not support connections from ODBC
(which is what BCP uses). I learnt recently that it does not support OLE DB
connections, but I don't recall what was said about ODBC.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx

Reply With Quote
  #3  
Old   
Lilian
 
Posts: n/a

Default Re: BCP and SQL Azure - 04-26-2010 , 09:03 AM



I was not aware that BCP used ODBC to connect.
However sql.azure.com provides ODBC connection strings so I suppose it
should be supported?

"Erland Sommarskog" wrote:

Quote:
Lilian (Lilian (AT) discussions (DOT) microsoft.com) writes:
I have the following error when trying to connect to SQL Azure using BCP:
Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed
for user 'MYUSER'.

The command line used is:
bcp.exe "MYDATABASE.dbo.MYTABLE" out "C:\temp\test.tmp" -E -q -n -S
MYSERVER.database.windows.net -U MYUSER@MYSERVER

The error message appears when entering the password on the following
prompt.

You can also specify password with -P.

The problem may be that SQL Azure does not support connections from ODBC
(which is what BCP uses). I learnt recently that it does not support OLE DB
connections, but I don't recall what was said about ODBC.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
.

Reply With Quote
  #4  
Old   
Alan Brewer [MSFT]
 
Posts: n/a

Default Re: BCP and SQL Azure - 04-26-2010 , 12:39 PM



According to this page, bcp is now supported with SQL Azure:
http://msdn.microsoft.com/en-us/library/ee621784.aspx

This example connection string was provided in a SQL Azure forum posting:
bcp database.dbo.Table out C:\Temp\testfile.dat -S
server.windows.database.net -U admin@server -P pass@word

Looks like the main difference is the missing -P from your attempt.

The forum posting is:
http://social.msdn.microsoft.com/For...3-152d29ed4ad1

--
Alan Brewer [MSFT]
SQL Server Documentation Team

SQL Server 2008 Books Online:
http://msdn.microsoft.com/en-us/library/ms130214.aspx

This posting is provided "AS IS" with no warranties, and confers no rights.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.