Skip to content

az sql db export with long string password failed in Azure pipeline and local machine and succeed with azure cloud shell. #25389

@zhutian33

Description

@zhutian33

Run az sql db export --resource-group ''
--subscription ''
-a SQL
-s ''
-n ''
-p ''
-u ''
--storage-key ''
--storage-key-type 'StorageAccessKey'
--storage-uri ''
--verbose
with long string password (127 characters long with letters, digit and ^#*!% ) in Azure could shell could successfully export the database to storage account. But run the same command in Azure pipeline failed with error:
ERROR: (ImportExportJobError) The ImportExport operation with Request Id '' failed due to 'The username or password for the given SQL server is incorrect.'.
Code: ImportExportJobError
Message: The ImportExport operation with Request Id '' failed due to 'The username or password for the given SQL server is incorrect.'.
[Enter feedback here]
The problem can be reproduced on the machine that runs the pipeline. I have set up a self-hosted agent and run pipeline on the machine, problem can be reproduced. Now, the CLI with such long password can only run successfully on the cloud shell in Azure portal. (The version of CLI in Azure portal, VM and Microsoft hosted agent are all the same -- 2.44.1)

If I change the password as Abc@123, it works well in azure could shell, azure pipeline and local machine.

Please help to check the password field for invalid character and length in Azure CLI.

failed due to 'The username or password for the given SQL server is incorrect.'

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions