Solved

Remote SQL Azure Database BCP Connection Problem

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

In the market for a new backup solution for Windows Server 2016? Follow these guidelines to get the most bang for your buck.
Many of the companies I’ve worked with have embraced cloud solutions due to their desire to “get out of the datacenter business.” The ability to achieve better security and availability, and the speed with which they are able to deploy, is far grea…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

623 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