I run an in-house application, programmed with visual studio 2008, that uses SQL Server 2008 as the back end. In addition to the server, my users have demanded the ability to store data in independent files. The reasons cited include:
- away from office or traveling, sometimes to other countries
- we have offices in several cities, some of which do not have a sql server
- the need to make “unofficial” copies of data, for backup, work in progress, alternate scenarios, email to other offices, etc
How should I implement this? The ideal solution, in the interest of maintainability, would be a standalone database that requires no duplication or rewriting of the data access code. Simply set the connection string and off you go.
Is such a thing even possible? I suppose the closest relative is SSCE, but my understanding is that it lacks certain features such as views, procs, etc. So if any data access code utilizes such objects, then it wouldn’t carry over for the standalone db.
Currently, I am using MS Access as my standalone db option (since this is in-house all users will have Office). So far I have managed to make this work without too much fuss, but I wonder for how long since Access and Sql Server are fundamentally two different animals.
As mentioned, currently the program is in VS2008, but soon I hope to upgrade to VS2010 and start using Entity Framework, if that helps things.
EDIT:
Well, from the two responses below, it appears that SSCE is the standard choice. But it’s not a perfect duplicate because as mentioned it lacks several features of full SS. I understand why, since such features probably aren’t necessary for a small, local database. But, for an application whose data access layer was originally coded for Sql Server, seems there’s at least a possibility of requiring alternative code.
Installing SSExpress on every user’s machine would probably be a way to retain the SS features, but that’s a step that I’m hesitant to make, given our setup.
This is exactly why they created “Local Database Cache”.
File -> New -> Local Database Cachehttp://msdn.microsoft.com/en-us/library/bb882690.aspx
http://msdn.microsoft.com/en-us/library/dd420781(v=vs.90).aspx
This is called an occasionally connected client. This framework will help you keep pieces of data that you need to function and will allow you to synchronize any data changes with the server when reconnected.