locked
SQL Server Native Client + SQLCMD in SoftGird RRS feed

  • General discussion

  • We're currently attempting to sequence SQL Server Native Client and SQLCMD in SoftGrid. What we want to do is allow certain users to run SQL scripts using sqlcmd.

    The command line we use to run scripts in the sequence is identical to the one we use for physically installed sqlcmd:

    Code Snippet
    sqlcmd -E -S servername -i "M:\Application Name\path\script file.sql"


    Unfortunately when we run the command using SoftGrid, we are presented with a pipe error:

    Code Snippet
    HResult 0x2, Level 16, State 1
    Named Pipes Provider: Could not open a connection to SQL Server [2].
    Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establishing a connection to the server. When connecting to SQL
    the default settings SQL Server does not allow remote connections..
    Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

     

    ...

    As I was typing this I realized the path to the script might be the problem, so I changed the path to its shortname equvalent (M:\applic~1\path\scriptfi~1.sql) and now it works. I don't know how sqlcmd reads its input file, but apparently it can't play nice with SoftGird...

    Thursday, June 19, 2008 1:23 PM

All replies

  • Thank you for posting this information!  The shortname update is what probably did the trick. 

    Thanks again!
    Dan Bernhardt [MSFT]
    Thursday, February 5, 2009 4:54 PM
    Answerer
  • Hi Tanin,

    Thanks for posting your solution :)

    Could you eloborate the issue that you were facing because Iam not sure whether I got it right.

    "The command line we use to run scripts in the sequence is identical to the one we use for physically installed sqlcmd"

    Where exactly do you use this script? so do you mean that the command line with the shortfilename worked with softgrid?




    J.Caleb Kirubakaran
    Friday, February 6, 2009 8:51 AM