go-sqlcmd icon indicating copy to clipboard operation
go-sqlcmd copied to clipboard

Cannot stop other context

Open way0utwest opened this issue 2 years ago • 2 comments

I had two contexts set up, and when I tried this code, I got an error:

sqlcmd stop mssql2

I would expect to be able to specify a context and stop it. Switching between them is a hassle.

The error is shown here: 2023-04-11 17_36_57-cmd

way0utwest avatar Apr 11 '23 23:04 way0utwest

The user model here follows the patten for CLIs like kubectl, or oc (Open Shift CLI), to switch context just run:

sqlcmd use mssql2

stuartpa avatar Apr 17 '23 08:04 stuartpa

I understand I can switch context, but switching, ending, then potentially switching back, is a hassle. I'd expect I could a paramaterize this.

I am assuming this is a design decision. Feel free to close or link to a future enhancement.

way0utwest avatar Apr 17 '23 15:04 way0utwest