I need to determine programmatically if the database supports the Geography data type and Spatial indexes. These features were introduced in 2008. I also need to determine if CLR is enabled as these features rely on it. What is the most reliable way to do this?
I need to determine programmatically if the database supports the Geography data type and
Share
SQL Server 2008 is 10.x
You can use SERVERPROPERTY in SQL and query sys.configurations
Edit: added CAST