Connecting to SQL DB bug?

I’ve been building a dashboard for the last couple of days and I’ve been making some progress. My dashboard grabs data from a SQL DB and displays specific information as charts and tables. Since this is a test DB, I’ve never included any credentials in my Invoke-SqlCmd2 command and it always runs perfectly… until today.

On Friday when I went home everything worked. This morning, however, I received the following error as soon as a I ran my dashboard.

"Login failed for user 'COB\C07655$'."

That’s my computer name not the username I used to login.

it seems your dashboard are running as “System” and not your user.

How do I change it back to user? And why did it change?

Additionally, I keep getting different types of errors every time I open VS Code.

PSUniversal

After almost driving myself crazy, I was finally able to resolve this issue by

  1. Uninstalling the PowerShell Universal Extension
  2. Opening Task Manager and killing a process that somehow was left hanging even after rebooting, I believe it was called something like Universal.Server.
  3. Delete C:\ProgramData\UniversalAutomation\database.db, Universal.Server.exe was having issues opening it because it was already in use.
  4. Re-Installing the extension.

Did you recently update PowerShell Universal?
I have found each time I update PowerShell Universal, it resets the account the service runs as to system instead of the service account my dashboard needs to run under. I have to change it back to the service account each time. My dashboard also connects to a SQL database and the service account needs access to the DB so it breaks.

I didn’t update the app, somehow a service was left hanging and that was causing the issue.

But out of curiosity, and in case I face this issue when I update, how do you change back to the service account?

You change it in Windows Services

Capture1

Thank you so much! I’ll keep this in mind next time I update.