2

Expanding on this question, what is the best way to develop against both SQL Server 2005 and SQL Server 2008?

I'd like to see if I could just use Orcas technology on my current Vista 64 machine and since SQL Server 2005 wants to install a stub version of Visual Studio 2005, I'd like to avoid using it. However, most places where my technology would be deployed are on SQL Server 2005 for the foreseeable future.

So what would be the best course of action:

  1. Install SQL Server 2008 only on my development machine and just be cognizant of the 2008-specific abilities
  2. Install SQL Server 2008 and SQL Server 2005 on separate instances on my development machine and develop against either depending on what the production project requires
  3. Install SQL Server 2008 only on my development machine and install SQL Server 2005 on a different machine (like a test server)
  4. Install SQL Server 2005 only on my development machine and install SQL Server 2008 on a different machine (like a test server)
Community
  • 1
  • 1
Tom Kidd
  • 12,830
  • 19
  • 89
  • 128

3 Answers3

3

The safest practice is to code against the oldest database server you support. This version is the one that will be far more likely to give you trouble. By and large the new versions of the db will have backwards compatibility to support your TSQL and constructs. It is far to simple to introduce unsupported code into the mix when using a newer version db then your target.

Aaron Fischer
  • 20,853
  • 18
  • 75
  • 116
1

You need to code against the oldest version of SQL Server, so that you don't start using features not available until more recent versions. Although it is not necessarily true that the newer versions will continue to support older features, the best way to make sure is to run Microsoft's own SQL Server Best Practices Analyzer which will notify you of compatibility issues.

Iain Hoult
  • 3,889
  • 5
  • 25
  • 39
0

The referenced question suggests changing the database compatibility level, this is a short term solution that would not be automated easily.

Its important to have automated testing, and if your reading stackoverflow, you probably agree.

I would say get both MS SQL Server 2005 and 2008 running.
Then, assuming you run unit tests, always unit test your database code against both servers.

KyleLanser
  • 2,699
  • 2
  • 21
  • 21