You can try to decrease the number of allowed page versions as that will reduce the number of items in the database. You can also increase the sql timeout in the connection string.
you can delete property from code and after that, you should be able to delete the orphan property in CMS -> Admin -> Content Types.
To double-check if these properties are still in use, I would go to Find -> Overview and Explore the desired content type. (Do not know how you set up properties but I assume the property you are trying to delete is nested property)
To investigate SQL time out - you can go to Azure portal databases and select your environment database (I assume you are using DXP). You can check which queries are taking long or timing out.
Oskar: I like the idea of trying to set the SQL timeout, is it just a matter of increasing the value for "Connection Timeout" in the connection string?
Naveed: I have already deleted the property from the code and we are not using DXP.
EDIT: The "Connection Timeout" in the connection string does not help. I need to set the timeout for the SQL Execution somehow.
Kent - my fear is if you are increasing timeout, you might be hiding problem under the carpet :) Just a thought.
Can you inspect with the SQL profiler?
Yes that is correct, I was thinking about command timeout and that can not be set in the connection string.
You can try with the solution in this ticket, increasing the value for databaseQueryTimeout , https://support.episerver.com/hc/en-us/articles/360038938952-Episerver-CMS-Timeout-exceptions-during-scheduled-jobs
So I'm doing some clean up on deprecated properties on our content types, but I'm having an issue I dont know how to solve. I have removed som properties from the code, then I started up the EPI project and syncronized the property type in the admin interface and as expected the removed properties got listed as "missing". However, when I try to delete the missing properties I'm getting an SQL timeout error.
I suspect it might be because these are content types with a lot of properties, and quite a lot of data in them.
Any suggestions on how I can remove these properties?