microsoft / microsoft/go-sqlcmd

Generated connection strings are incorrect

Open
#249 9 comments 0 reactions 1 assignee View on GitHub

@stuartpa is already working on this.

Since Feb 25, 2023.

bug sqlcmd switch
Dominant language
Go
Stars
595
Forks
91
Avg merge
9h 35m
Merged PRs (30d)
1

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.