Quantcast
Channel: Database Design forum
Viewing all articles
Browse latest Browse all 2729

Strategies on maintaining a codebase that supports various SQL Server Editions/Versions.

$
0
0

Hey all,

I have searched long and hard to find something about this on the internet as I can not be the only one on the planet with this issue, however, I can not find anything close to what I am required to do.  I've seen lots of things about version control... but that (as in Version1, Version2, version3 of an object) is not what I am needing.

I'm looking for a strategy for keeping my code base maintainable yet supporting various code for different versions and editions of SQL Server. 

For instance,

I have to support customers on SQL Server 2008-2016.  And, we would like to have a table (or object) that makes use of a feature in 2016.  Say.. "The in memory OLTP" feature of a table.  Obviously, this feature is not in 2008 or 2012, don't know if we want it for 2014, but would love to use it in 2016.  So, I would need Different "Create Table" scripts based on the SQL Server Version.  While I could have a single script with IF blocks for SQL Server Versions/Editions, The Create Table statement would have to be dynamic.. and therefor in a VARCHAR String.. which makes maintainability difficult. 

How have people dealt with this as far as Version features that are deprecated or added and Edition features (Partitioning in Enterprise) that rely on differing scripts to be run in the single shippable codebase?


Viewing all articles
Browse latest Browse all 2729


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>