I have this command
sqlcmd.exe -E -i "C:\joe-db-scripts\joe-db-tasks.Install.sql"
and I need to add the specific non-standard port of 32001. How do I do that? I was thinking of some flag like -p
or something but I don't know the syntax.
According to this MSDN link, you'd use -S tcp:servername,32001
.
That's it: How to Connect to the Database Engine using sqlcmd. Something like this:
sqlcmd -S ComputerA,1691
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With