SQL Server 2016 : Dropping Database Master Key used for encryption

Have you ever had a problem dropping the database master key? I was at a client and I wanted to drop the master key. But i was getting an error which read : “Cannot drop key because CREDENTIALS my-DB-Scoped-Cred.databases.windows.net is encrypted by it”. I tried a few things but what eventually worked for me was this command :

DROP DATABASE SCOPED CREDENTIAL [my-DB-Scoped-Cred.databases.windows.net]

GO

DROP DATABASE SCOPED CREDENTIAL [my-DB2-Scoped-Cred.databases.windows.net]

GO

DROP MASTER KEY

I thought this might help someone out there.

What has been your experience of working with SQL Server 2016? Let me know in comments.