I have a large SQL script (1gb) that I am trying to execute with an instance (localdb)\v11.0 using SqlCmd in a command window, but so far no commands I tried worked with it at all.
eg.
sqlcmd.exe -S "(localdb)\v11.0" -Q "select 1"
general connection error failure:
There was a network-related or specific instance error while establishing a connection to SQL Server. Server not found or unavailable. Verify that the instance name is correct and if SQL Server is configured to allow remote connections.
However
sqlcmd.exe -S "MY-PC" -Q "select 1"
works fine with an instance of SQL Server on my PC.
“Allow remote connections” is set to true on the instance (localdb) , and the user I'm running SqlCmd with is its owner.
Does SqlCmd work with instances (localdb) ? Are there other obvious things that I can do wrong?
source share