Solved

Remote SQL Azure Database BCP Connection Problem

Posted on 2011-02-11
2
1,425 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
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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Monitoring systems evolution, cloud technology benefits and cloud cost calculators business utility.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

912 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now