i want to execute a .sql file from cmd. Here's my command :
sqlcmd -e -S "(localdb)\myDB" -i "C:\PathToMyFile\File.sql" -U user -P password
Here's my errors :
Microsoft ODBC Driver 13.1 is installed. Someone knows what I've done wrong? Thx.
You are using the wrong server name:
sqlcmd -e -S "(localdb)\mssqllocaldb" -d MyDB -i "C:\PathToMyFile\File.sql" -U user -P password
or with Integrated Authentication:
sqlcmd -e -S "(localdb)\mssqllocaldb" -d MyDB -i "C:\PathToMyFile\File.sql" -E