Forum Discussion
Error when creating SQL Credential in SSMS 19
I was able to resolve it in SSMS 19.1.56.0 by adding this snippet:
<dependentAssembly>
<assemblyIdentity name="Microsoft.SqlServer.Management.AzureAuthenticationManagement" publicKeyToken="89845dcd8080cc91" culture="neutral"/>
<bindingRedirect oldVersion="1.0.0.0-16.0.0.0" newVersion="16.200.0.0"/>
</dependentAssembly>
in the assemblyBinding section of the file:
C:\Program Files (x86)\Microsoft SQL Server Management Studio 19\Common7\IDE\Ssms.exe.config. note that the version numbers may vary based on your specific environment.
- KrzysztofMigaczSep 01, 2023Copper Contributor
Woody0 Thank you for the information. I had a session with Microsoft today and am pulling this topic with them as well. I will let you know what I can figure out.
I will also check your solution.- Woody0Sep 01, 2023Copper Contributor
KrzysztofMigacz FWIW - I'm attempting to set up backups from an on-prem SQL2022 server to Azure Blob Storage. The only way I was able to create the credential was to:
- Right-click a database, select all tasks then back up
- select the destination of URL
- Click the Add Button
- Click the New Container button
- Sign in to an azure subscription
- Select the Azure Subscription, Storage Account and Blob Container, then click OK.
Once the container was created, I was able to select it as a destination from within the maintenance plan, however:
When trying to create a database backup from a maintenance plan, the TSQL generated is:
BACKUP DATABASE [MYDB] TO URL = N'https://myblob.blob.core.windows.net/backup-sql' WITH CREDENTIAL = N'https://myblob.blob.core.windows.net/backup-sql' , NOFORMAT, NOINIT, NAME = N'MYDB_backup.bak', SKIP, REWIND, NOUNLOAD, COMPRESSION, STATS = 10
This generates the error:
Msg 3225, Level 16, State 1, Line 2 Use of WITH CREDENTIAL syntax is not valid for credentials containing a Shared Access Signature. Msg 3013, Level 16, State 1, Line 2 BACKUP DATABASE is terminating abnormally.
Syntax that worked is:
BACKUP DATABASE [MYDB] TO URL = N'https://myblob.blob.core.windows.net/backup-sql/MYDB_backup.bak' WITH FORMAT, NAME = N'MYDB-Full Database Backup', COPY_ONLY, NOREWIND, NOUNLOAD, STATS = 10
I ended up wrapping the working syntax into a script rather than using the maintenance plan.
- KrzysztofMigaczOct 13, 2023Copper Contributor
Hello,
how are you doing? I hope you are well.
Tell me what script you use to delete copies older than, say, 7 days?Best Regards
Krzysztof