-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default SQL Server database command to sqlcmd
#28918
Conversation
@@ -568,6 +578,10 @@ func (c *CLICommandBuilder) getSQLServerCommand() *exec.Cmd { | |||
args = append(args, "-d", c.db.Database) | |||
} | |||
|
|||
if c.isSqlcmdAvailable() { | |||
return exec.Command(sqlcmdBin, args...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it support exactly the same arguments as mssql-cli
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and since we're always using a tunneled proxy, there is no need to have additional flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, adding a comment to that effect might be helpful here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a comment on the function godoc.
@gabrielcorado See the table below for backport results.
|
we may want to fallback to |
Given
mssql-cli
is being deprecated in favor ofsqlcmd
, we're switching it to be the default command, with fallback tomssql-cli
when it is not present onPATH
.Note: Both, Golang and ODBC-based implementations are supported.