Skip to content

Generated connection strings are incorrect #249

Open
@yorek

Description

@yorek

When generating the connection strings via sqlcmd config connection-strings, the ADO.NET doesn't work as is:

  • The connection string contains spaces that make it hard to just copy-and-paste it into an application/configuration file
  • The "Encode" property doesn't exist (it should be "Encrypt"?)
  • The "Persist Security options" doesn't exist (it should be "Persist Security Info"?)

Reference to connection string keywords is here: https://learn.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.connectionstring?view=dotnet-plat-ext-7.0

Also, the connection string comes with the default for TrustServerCertificate to false, which make it hard to use it with a local SQL Server. sqlcmd should detect if the connection string is generated for a local machine and automatically set that property to true, to make usage frictionless.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingsqlcmd switchswitch in existing sqlcmd

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions