5

What benefit do I derive from installing Sql Express with Visual Studio (2010) when I already have Microsoft Sql Server Developer (2008)?

The only benefit I can imagine is that I can develop for either platform without having to be concerned with which one(s) I have installed. Is there an actual negative detriment to removing Sql Server Express (specifically the SqlExpress instance) from my development machine?

jcolebrand
  • 15,889
  • 12
  • 75
  • 121
  • Almost identical to http://stackoverflow.com/questions/2466564/visual-studio-2010-and-sql-server – JeffH Jun 28 '12 at 17:46
  • The other answer talks about using the `App_data` folder, which presumably comes along with using the `User Instance` and `AttachDbFileName` features. I implore you to ***NOT*** do this. If you want a second opinion I am sure @marc_s will back me up. :-) – Aaron Bertrand Jun 28 '12 at 17:51
  • Yeah, I wasn't sure about that Jeff, because that one just says "which should I use" and doesn't address "should I be able to safely remove it" – jcolebrand Jun 28 '12 at 18:05

2 Answers2

7

The only advantages I can think of to having Express as well are:

  • if you want to develop applications that specifically target Express, using Express can help prevent you from using features that work in Developer but won't work on your targets (e.g. compression, partitioning).
  • if you already have applications that use the Express instance, they will obviously stop working until you move those databases to the other instance and update the apps to point at the other instance.

If neither of those situations are relevant, I can't think of a single downside to removing the Express instance. To be safe you may want to start by stopping and disabling the Express service for a week, just to be sure nothing you have is relying on it.

Note that uninstalling Express from Programs and Features will remove the engine but it will leave any of your user databases intact. So there is no fear of data loss, provided you stop the SQL Server service gracefully before you uninstall it.

To remove SQL Server Express, you would right-click whichever of these items appears in Add/Remove Programs / Programs and Features:

Microsoft SQL Server 2008
Microsoft SQL Server 2008 (64-bit)

(There should only be one of those unless you've got a really messed up set of instances on an x64 machine.)

  • When you right-click, select "Uninstall/Change"
  • You'll get a dialog box adding if you want to add, repair or remove; select remove
  • Next you'll see a "Setup Support Rules" dialog - if OK is available, click it, otherwise you will probably need to restart your computer before proceeding
  • Then you'll be on the "Select Instance" screen. There is a dropdown called "Instance to remove features from:" - select SQLEXPRESS and click Next
  • Then you'll have a screen called "Select Features" - here you'll want to select "Database Engine Services" only (I don't think you want to remove any of the shared features). Click Next
  • Should be smooth sailing the rest of the way, but as mentioned you will have to clean up the folder, which is probably:
C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\

Should be safe to delete everything there unless you want to save any of the user databases. You might also search for .mdf files you want to expunge or save that may have been copied to various parts of your system due to use within an application or during development.

Aaron Bertrand
  • 272,866
  • 37
  • 466
  • 490
  • Actually fear of data loss was one of my primary concerns, good to know. How can those be cleaned up besides manually hunting down those files in the future? – jcolebrand Jun 28 '12 at 18:05
  • 1
    There is no automatic cleanup (I think Microsoft does not want to get sued for deleting your data). – Aaron Bertrand Jun 28 '12 at 18:06
3

SQL Server Developer edition doesn't include User Instances feature (aka RANU) that is only available in SQL Server Express edition. Visual Studio 2010 and earlier is using User Instances to open MDF files embedded in your projects. With Developer edition, but without Express edition you would see an error if you tried to open these files.

Now, Visual Studio 2012 includes LocalDB version of SQL Server 2012 Express for this purpose.

Krzysztof Kozielczyk
  • 5,887
  • 37
  • 28