Answered BCP from SQL Azure

  • Friday, March 19, 2010 6:00 PM
     
     

    Hi All,

    I am trying to BCP out from SQL Azure and found that BCP command doesnt take SQL Database name as a parameter and SQL Azure doesn;t like my Database.Schema.Table notations. Any ways to get through.


    Thanks, Loonysan | http://mystutter.blogspot.com

All Replies

  • Saturday, March 20, 2010 8:25 PM
     
     Answered Has Code

    Hello

    BCP Out should work fine.

    Here's a sample:

    bcp database.dbo.Table out C:\Temp\testfile.dat -S server.windows.database.net -U admin@server -P pass@word
  • Wednesday, March 24, 2010 2:01 AM
     
     
    FYI - QueryOut option with SQL Azure doesn't work - Might have to wait for the next release !!!
    Thanks, Loonysan | http://mystutter.blogspot.com
  • Thursday, April 29, 2010 9:27 PM
     
     

    Any guess on why this error is produced while trying to BCP out from SQL Azure?

     

    SQLState = S1000, NativeError = 0
    Error = [Microsoft][SQL Server Native Client 10.0]Unable to open BCP host data-f
    ile


    mysorian
  • Thursday, April 29, 2010 9:36 PM
     
     

    Did you get this to work?

     


    mysorian
  • Saturday, May 01, 2010 1:03 AM
     
     

    You need to use

    tcp:serrvername.database.windows.net

    and

    username like in username@servername

     

    Dinakar's command will not work


    mysorian
  • Tuesday, May 04, 2010 6:24 PM
     
     

    Hi Jayaram

    The sample code I posted should work. Are you seeing any errors?

  • Wednesday, May 05, 2010 12:30 PM
     
     

    As I said earlier you need to use tcp: ahead of server.database.windows.net otherwise in Windows 7 you would get a tcp/ip related error. SQL Azure works thru' tcp.

    And the username should be usrname@servername

    Otherwise your code will work.

    You may need to add the option -w if you are intereseted in getting the output in recognizable ascii.


    mysorian
  • Wednesday, May 05, 2010 9:53 PM
     
     

    Hi Jayaram

    Your username has to be in the format login@server (as I mentioned in my original reply) however the server name does not have to be prefixed with "tcp:".

  • Thursday, May 06, 2010 6:07 PM
     
     
    Thank you
    Need Help
  • Wednesday, June 23, 2010 2:27 PM
     
     

    Hi Jayaram

    Your username has to be in the format login@server (as I mentioned in my original reply) however the server name does not have to be prefixed with "tcp:".


    Many thanks. It does work.