You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running dbup-cli.exe (in WSL2 or in Windows PowerShell) returns this error:
$ dbup-cli.exe status
Parameters: Connection String: RunAs=Developer;DeveloperTool=AzureCli,
Resource: https://database.windows.net/, Authority: .
Exception Message: Tried to get token using Azure CLI. Access token could not be acquired.
'az' is not recognized as an internal or external command, operable program or batch file.
But running the dotnet tool with SDK 6.0 works fine:
$ dbup status
Database upgrade is required.
You have 1 more scripts to execute.
Things I've tried:
Ran sudo dbup-cli.exe (and in PowerShell Admin prompt) - doesn't change behaviour.
Setting AzureCLIPath (MSDN_link) and setting envvar etc. - nothing changes behaviour.
Installed az cli in WSL2 and tried to set AzureCLIPath - nothing changes behaviour.
Installed dotnet 6 SDK and installed dbup cli with dotnet tool install --global dbup-cli and using dbup - works perfectly: gets the token from az cli and connects.
Contents of .env file to specifically use AzureCli to get token and ignore the other 3 providers:
dbUp:
version: 1 # should be 1
provider: AzureSql # DB provider: AzureSql - suppports token auth
connectionString: Server=tcp:MYAZURESQLSERVER.database.windows.net,1433;Database=MYDBNAME;Encrypt=true;
scripts:
- folder: 000-test-scripts-always/ # absolute or relative to folder with *.sql files
subFolders: no # yes / no (default)
order: 000 # script group order, default 100
runAlways: yes # yes / no (default)
A single .sql file 000-test-scripts-always/000-test.sql:
select original_login() as original_login;
go
What is the issue?
I get different behaviour with the pre-built dbup-cli.exe being unable to find az whereas running dbup tool under dotnet 6.0 sdk works as expected - what I can try next please?
Can I trigger additional logging when running dbup-cli.exe to help diagnose this please?
The text was updated successfully, but these errors were encountered:
Running dbup-cli.exe (in WSL2 or in Windows PowerShell) returns this error:
But running the dotnet tool with SDK 6.0 works fine:
Things I've tried:
sudo dbup-cli.exe
(and in PowerShell Admin prompt) - doesn't change behaviour.dotnet tool install --global dbup-cli
and usingdbup
- works perfectly: gets the token from az cli and connects.Contents of
.env
file to specifically use AzureCli to get token and ignore the other 3 providers:Contents of
dbup.yml
:A single .sql file
000-test-scripts-always/000-test.sql
:What is the issue?
dbup-cli.exe
being unable to findaz
whereas runningdbup
tool under dotnet 6.0 sdk works as expected - what I can try next please?dbup-cli.exe
to help diagnose this please?The text was updated successfully, but these errors were encountered: