Open SQLDBAWithABeard opened 1 year ago
Great to see sqlcmd being used with different container repos! Interesting use case here.
Is the fix here, to all the sqlcmd delete
to succeed, even if the endpoint no longer exists. (or should we not delete the endpoint in the first place, because another context is referencing it!)?
Or should we enable being able to specify the user in the "sqlcmd create" statement, so we don't auto-generate one, and use the pre-existing user?
I like the idea of being able to specify the user (and pwd via env variable) in the sqlcmd create
statement.
I think you should not delete the endpoint if it is being referenced by another context because that will allow me to also have context for 'admin roles' and context for 'app roles' against the same container. (I am trying to think of real world use cases here where people would create additional users)
I don't know if this is - As a user I would like to be able to edit the context to use a different user!
or
As a user I want to be able to run
sqlcmd create mssql
for containers with custom users and add the user to the context!With that in mind, this is what I did.
I am finishing my demo for Data Ceili and wanted to show that you can use a custom container. So I decided to use our dbachecks one which has a custom user.
My config is blank
so I create a container like so - I use verbosity 4 so I can see the log and see when I can CTRL C safely
now that has run, my config looks like
obviously I cannot connect with this user.
So I create a new user
and then a new context with the new user
and show the funky off
at this point config looks like
all wonderful until we do
Now config looks like this without any context but with a user
if I try to delete my current context
I have to add an endpoint back again to be able to delete :-)