sqldatabasesql-server-2012-expresssql-server-2012-localdb

Can I reuse database file of localdb in Express editions


I am going to build a small application and like to use SQL Server LocalDB, but I'm confused about some points

When I start my instance and shared it in main PC and connecting to my database, does anyone on my local network can see this instance?

I think to work LocalDB instance until face case to work multiple user in network to switch this database from LocalDB to normal Express edition and work with it as normal.

So can I use the *.mdf, *.ldf files of LocalDB in SQL Server Express edition any time?


Solution

  • When I start my instance and shared it in main PC and connecting to my database, does anyone on my local network can see this instance?

    No - LocalDB is a local machine ONLY affair - only from your own local machine can you see and connect to that instance.

    So can I use the *.mdf, *.ldf files of LocalDB in SQL Server Express edition any time?

    Yes, absolutely - those .mdf (and .ndf and .ldf) files are compatible between LocalDB (which is really just a variant of SQL Server Express) and any other full-fledged SQL Server version (Express, Web, Standard, Developer, Enterprise) - just not with SQL Server Compact - that's a totally separate world with .sdf files.