I am working on a personal project and have implemented a database system using the Entity Framework code first tutorial on msdn, link below,


I am running Visual Studio 2012 and the database has been created using Microsoft SQL Server and localdb. However i wish to run my application on any computer and this current setup will not allow me to do so.

I am a bit of a novice when it comes to databases, and would like some advice/resources that outline how i can change my database setup so that it is available on any computer and also retain the data currently in my database.

Any help would be greatly appreciated, Thanks in advance!

  • Flagged to move to dba.StackExchange.com ... This isn't a bad thing, the reason simply being that you'll typically get a more comprehensive explanation as this is within their realm of focus. – Eric J. Price Apr 9 '13 at 17:28

For LocalDB you'll need to install SQL Server Express on all the machines where you want to run your application. If you don't want to do that, have a look on SQL CE. That allows you to have only DB file moved about and all the required libraries can be included in your project.

| improve this answer | |

When using SQL Server LocalDB, you can move the application to other pc's as much as you like, provided the SQL Server LocalDB functionality is installed. Check here for more info.
They provide a nice way to silently install it, so you can bundle it with the installer for your application:


All you need to do then is copy the mdf and ldf files to a location of your choice and update the configuration file to use these files.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.