Transactional Replication setup issue

  • Hi!

    I've been banging my head against the wall for 2 days now trying to setup Transactional Replication between an Managed Instance and Azure SQL Database.

    Documentation: https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/replication-two-instances-and-sql-server-configure-tutorial?view=azuresql

    That's the documentation I'm working with although I'm using the same instance for distribution and publishing.

    I've double checked the config on Azure and replication multiple times and rebuild it a few.

    The issue is that I keep ending up with is the Snapshot agent can't decrypt the Azure storage key.

    Agent history log:

    Initializing

    Connection to Distributor 'REMOVED'

    Obtained Azure Storage Connection String for 'REMOVED'

    Connection to Distributor pipe - Decrypt key 'REMOVED'

    Disconnecting from Azure Storage ''

    Failed to decrypt Azure storage key.

    So either the Distributor pipe isn't responding correctly or there's something wrong with the key or access to it?

    Anyone have any ideas on what's up here?

    Thanks!

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Probably a dumb question, but you created a key correct and updated the instructions to use your key not the example one they have in their sample scripts, correct?

    What I'd do is what is suggested in step 11 of creating the publication - generate the script. Review the script for anything that looks like it may be causing issues. For example, do you have any accounts or passwords that MAY be escaping the connection string?

    Plus, if you run it from the script, you will get the errors in the result window. Might not hurt to review those to see what's what. My guess is that something is wrong in the connection string or with the key itself.

    The above is all just my opinion on what you should do. 
    As with all advice you find on a random internet forum - you shouldn't blindly follow it.  Always test on a test server to see if there is negative side effects before making changes to live!
    I recommend you NEVER run "random code" you found online on any system you care about UNLESS you understand and can verify the code OR you don't care if the code trashes your system.

  • I'd lean towards what Brian notes here. Likely you missed something or need access to a different key

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply