Solved

Remote SQL Azure Database BCP Connection Problem

Posted on 2011-02-11
2
1,494 Views
Last Modified: 2014-11-12
Hi, I'm trying to use BCP with my SQL Azure database. The following bcp call to get a format file is resulting in as error:

bcp databasename.dbo.tablename format nul -x -f c:/localstoragepath/FormatFileName.xml -n -S myservername.database.windows.net -Umyusername -Pmypassword -T

The error returned is:
Server name cannot be determined. It must appear as the first segment of the server's dns name (servername.database.windows.net). Some libraries do not send the server name, in which case the server name must be included as part of the user name (username@servername). SQLState=37000, NativeError = 40531

Can anyone point out the problem with my bcp command parameters? Thanks!
0
Comment
Question by:Drevo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 50

Accepted Solution

by:
Lowfatspread earned 500 total points
ID: 34878181
have you tried

bcp databasename.dbo.tablename format nul -x -f c:/localstoragepath/FormatFileName.xml -n -S myservername.database.windows.net -Umyusername@myservername -Pmypassword


as the error suggests you may need to include the server name on the userid...

also i don't think you should also have the -T flag ... its not a trusted connection ?

anyway -U -P should be mutually exclusive with -T  i believe it would have been trying a trusted connect
rather than you userid and password....
0
 

Author Comment

by:Drevo
ID: 34902083
Fantastic answer Lowfatspread! Thank you so very much!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Monitoring systems evolution, cloud technology benefits and cloud cost calculators business utility.
The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question