EXECUTE denied on Managed Instance

The problem I came across an interesting (!) issue with an Azure Sql Managed Instance today. One of our users came across this error when trying to SELECT from a view in a database where they are not a member of the db_owner database role or any elevated server-level permission by right clicking the view in SSMS 18.8 and choosing Select Top 1000 Rows. Select Top 1000 Rows in SSMS EXECUTE denied on xp_instance_reg_read in mssqlsystemresource The full text of the error is The EXECUTE permission was denied on the object 'xp_instance_regread', database 'mssqlsystemresource', schema 'sys'. I verified that this was indeed the case with: ...

Wed, 17 March 2021 · 4 min · Mark

Az.Sql Module won't load

Today, the Az.Sql module would not load on my machine when attempting to manually fail over a SQL Managed Instance with this error: module could not be loaded I followed the advice of the error message and tried to import the module to get further information. module is already loaded Hmmm :thinking: I decided to uninstall the Azure PowerShell from my machine using the Windows 10 Settings App. Looks like an old version. ...

Tue, 16 March 2021 · 1 min · Mark

Running Sql Server in an Azure Container Instance

Azure Container Instances are still in Preview and not officially available for Windows yet, which made me smile. It took me a while to figure out how to get this working so I thought I’d share what I’ve found. Containers are great for lightweight testing of code before deployment to production servers because they can be created so quickly and they give the same environment to test in very reliably. Now that Microsoft is offering container instances in Azure it means you don’t have to worry about provisioning and configuring your own docker host/cluster. The options for deploying SQL Server are really getting large now, look at this list below! ...

Tue, 24 October 2017 · 3 min · Mark