Well, that’s CRUDy

Joey Brakefield
1 min readJun 17, 2021

--

I recently had a person reach out to me stating that a very scary T-SQL error message in Azure SQL was preventing them from working.

That seemed strange since I was unaware of any changes in either the Azure subscription or the Azure SQL instance. After poking around for a day or two, I was stumped.

Turns out there was a registered provider in the Azure subscription (odd place for it!) that blocks T-SQL CRUD commands on all databases in a subscription. This could potentially impact anyone in that subscription from being able to issue T-SQL CRUD commands as they once did with on-premises code.

It’s an odd little quirk but one I think is worth mentioned on this (micro)blog. Cheers!

Here are the deets:

Error: — — — — — — — — — — — — — — — Program Location: at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType, Boolean retry) at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType, Boolean retry) at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries, Boolean retry) at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ExecuteNonQuery(StringCollection queries, Boolean includeDbContext, Boolean executeForAlter) at Microsoft.SqlServer.Management.Smo.NamedSmoObject.ExecuteRenameQuery(String newName) at Microsoft.SqlServer.Management.Smo.NamedSmoObject.RenameImplWorker(String newName) at Microsoft.SqlServer.Management.Smo.NamedSmoObject.RenameImpl(String newName) =================================== TSQL CRUD has been disallowed via policy for this Azure subscription (.Net SqlClient Data Provider)

Solution: UN-register that provider!

Unregister the provider, FTW!

--

--

Joey Brakefield

Cloud Data Scientist in-training, former rugger, all-around geek. @kfprugger for my personal ramblins