Skip to content

Review sqlcmd config connection-strings #170

@stuartpa

Description

@stuartpa

The output for:

sqlcmd config connection-strings

Was taken from the Azure SQL DB 'connection strings' portal page, but the output hasn't been reviewed for the context of sqlcmd

// connectionStringFormats borrowed from "portal.azure.com" "connection strings" pane
var connectionStringFormats = map[string]string{
	"ADO.NET": "Server=tcp:%s,%d;Initial Catalog=%s;Persist Security Options=False;User ID=%s;Password=%s;MultipleActiveResultSets=False;Encode=True;TrustServerCertificate=False;Connection Timeout=30;",
	"JDBC":    "jdbc:sqlserver://%s:%d;database=%s;user=%s;password=%s;encrypt=true;trustServerCertificate=false;loginTimeout=30;",
	"ODBC":    "Driver={ODBC Driver 13 for SQL Server};Server=tcp:%s,%d;Database=%s;Uid=%s;Pwd=%s;Encode=yes;TrustServerCertificate=no;Connection Timeout=30;",
}

e.g. PR feedback:

"what is "Encode" ?" -David

I also presume the specifics of each connection string might depend on the specifics of the endpoint, e.g. would the mssql-edge connection string be slightly different to a mssql-server connection string, and will a azuresqldb connection string be different for a local box installation etc. etc.

Also related to this, if the connection strings are different for exactly what each endpoint is, do we need to store metadata in the sqlconfig file endpoint: to keep track of exactly what the endpoint is (mssql-server or mssql-edge or azuresqldb etc.)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions