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
337 stars 59 forks source link

`sqlcmd open ads` fails with: Not enough memory resources are available to process this command" #233

Closed stuartpa closed 1 year ago

stuartpa commented 1 year ago

A Bug Bash tester hit this error when opening ADS, even though there is 10GB free on the machine

It might be this issue with too many credentials in credman:

https://github.com/desktop/desktop/issues/15217

SQLDBAWithABeard commented 1 year ago

I fixed this by removing credentials using the CredentialManager module

 $a = Get-StoredCredential  -AsCredentialObject
 $a | Where UserName -Like '*Ben*' | ForEach-Object { Remove-StoredCredential -Target $_.TargetName}

Then I was able to open ADS image

shueybubbles commented 1 year ago

Is Azure Data Studio "leaking" credentials? Ie if you create a new connection in ADS and it adds the credential, when you delete the connection does it delete the credential?

shueybubbles commented 1 year ago

Indeed...https://github.com/microsoft/azuredatastudio/issues/21936

cheenamalhotra commented 1 year ago

Credential limit is applicable even when you do delete credentials but needed to save more than a certain number of passwords in Credential Store.. This is also reproducible with CredentialManager PS module (see https://github.com/microsoft/azuredatastudio/issues/20990#issuecomment-1293041067 for more info).

shueybubbles commented 1 year ago

For v1 - detect the error and give a better message.

stuartpa commented 1 year ago

Fixed (better error message added) in #240