microsoft / go-sqlcmd

The new sqlcmd, CLI for SQL Server and Azure SQL (winget install sqlcmd / sqlcmd create mssql / sqlcmd open ads)
https://learn.microsoft.com/sql/tools/sqlcmd/go-sqlcmd-utility
MIT License
323 stars 56 forks source link

Add product name and description to output #452

Closed rwestMSFT closed 8 months ago

rwestMSFT commented 10 months ago

Add product name to --version and -? output, to emulate the output of sqlcmd ODBC.

Fixes https://github.com/microsoft/go-sqlcmd/issues/392.

The ODBC tool output looks like this:

Microsoft (R) SQL Server Command Line Tool
Version 16.0.4025.1 NT
Copyright (C) 2022 Microsoft Corporation. All rights reserved.

Adding this PR would change the output from this (-?):

Version 1.3.0

Flags: [...]

To this:

sqlcmd: Install/Create/Query SQL Server, Azure SQL, and Tools
Version 1.3.0

Flags: [...]

And this (--version):

1.3.0
Legal docs and information: aka.ms/SqlcmdLegal
Third party notices: aka.ms/SqlcmdNotices

To this:

sqlcmd: Install/Create/Query SQL Server, Azure SQL, and Tools
1.3.0
Legal docs and information: aka.ms/SqlcmdLegal
Third party notices: aka.ms/SqlcmdNotices
shueybubbles commented 10 months ago

thx for opening a PR!

I don't think this particular output is relevant for cmd/sqlcmd, since legacy mode only supports queries. None of the flags -? prints are about install or create. ODBC is printing the product name and we don't really have a good product name other than "sqlcmd" yet. @dlevy-msft it'd be good to talk to the marketing/branding folks to see what name we should use.

rwestMSFT commented 10 months ago

@shueybubbles This is less about relevancy, and more about adding the name of the product when checking which version is installed. As discussed in other conversations, sqlcmd "-?" is a universal command that will run across OSes and versions of sqlcmd, and I think it should include a product name (whatever that is) before the version number, in this and --version info.

Alyst85 commented 6 months ago

✌️👍