I have a localdb database file, and my connection string to connect to it is the following (which works from the C# application):
connectionString="Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\db.mdf;Integrated Security=True";providerName="System.Data.SqlClient"
I do not have an instance, as I connect directly to the data file. I would like to execute scripts on this database, as it is set up on a large number of client PCs. To run the script, I have tried connecting to the database using SqlCmd, however it cannot find the database since there is no instance. How can I connect to the file?
I have tried the following: SqlCmd.exe -S (LocalDB)\v11.0\<path to my mdf file>
, however it times out as it does not find the database.