How to change the port when calling sqlcmd

前端 未结 3 1658
走了就别回头了
走了就别回头了 2021-02-05 08:47

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

3条回答
  •  無奈伤痛
    2021-02-05 09:08

    Following solution is working for me in SQL Server 2008 and above.

    sqlcmd -S "hostname or IP,port number" -U SA -P password

提交回复
热议问题