How to Convert from SQ to SQL Express and keep previous setting

I install V5 version with SQL server local DB 2014. because some reason i need install SQL Express 2012, now, if i link the database to SQL 2012, i will lost all the previous settings and menu database,So after i search forum i found one method:


But during this method, they need one files call “sambapos4.sdf”, i already download " SQL Server Compact Toolbox" and in "Add SQL SERVER COMPACT 4.0 Connection " steps i can’t find < sambapos5.sdf> in “c:\user\my documents\sambapos5” but i found sambapos5.mdf and SambaPOS5_log.ldf files.after i choose sambapos5.mdf frome Browser, they show the error message

So,everyone can help me convert from local DB to SQL Express and also can keep my previous settings and menu database.Thanks a lot.

Ok, firstly If I found this issue with SQL management studio when searching for a database, even if you go to the directory under the username that you are logged in with, it doesn’t seem to find anything. So easiest way to fix this I found was to make a new folder in C:\ (you can call it anything) put your database file in there, and the within sql again, try to direct yourself to that directory and try again there.

If the issue re occurs, I’d suggest try to backup your local database again with a different name, after that, put that file in the new folder you created, and try to convert it once again, and see how it goes that way.

I think you misunderstanding what was I mean. I just want change the V5 local DB to SQL2012 Express and also can keep my pervious configuratio.so I fellow
This method


But…in this method have one file call<sambapos4.sdf>,unfortunately in V5 version didn’t had this file.
So I just want know,It’s have another way to do it?

LocalDB is not the same as CE. The Tutorial you linked does not apply to your situation.

CE uses SDF file as the database. You cannot find the file because you don’t have the file, because you are running LocalDB as opposed to CE.

LocalDB uses MDF/LDF files for the database, just like SQL Express. The only practical difference between them is that LocalDB only allows 1 connection, while Express allows multiple connections.

So the good news is that upgrading from LocalDB to Express is very easy compared to a CE-to-Express upgrade. This is because LocalDB and Express use the same files for the DB, so you do not need to do any conversions.

You can use the DB Backup Module in SambaPOS or SQL Server Management Studio (SSMS) to “import” your LocalDB file into an Express installation. And in fact, it is not really an import at all. It is simply configuring the DB Engine to point to and use your MDF file(s).

It may also be considered to be more simple if you have a BAK file of the database. This essentially contains the MDF/LDF files within it. If you have a BAK file, it is a backup of the DB. You can use SambaPOS or SSMS to Restore the backup, which will extract the MDF/LDF files for you and “notify” the DB Engine of the existence of the database…

2 Likes