How to convert mdf to sql?

Good afternoon. I started the formation of the data base from the trial version of the program, after I purchased the license. Now I want to convert to SQL version, but I can not find the conversion instructions in sql.

.mdf is an SQL file…
Can you explaine?
Where’s the .mdf.
If your meaning your using Local (single instance SQL) and what to witch to change to full SQL server for multi terminal etc. You will be able to backup using samba database backup and tester into an SQL express database.

It’s a small SQL server file with install from standart single-user mod install…

mdf is an sql format…
So is it the localDB file or looking at screenshot a convert from a CE database.
If its local DB you are already using in samba right? Just use the samba backup tool.
If its a CE convert from memory you import it into instance using MSSQL Manager app as in the tutorial.

You are already using SQL. You don’t need to convert anything. If what you mean is you want to convert from localdb SQL to full SQL then just install SQL Express 2016 and load a backup from your localdb install.

When i tryed use backup and restore in sql express, it’s doesn’t working. Maybe i used incorrect this?

Based on your statement I can not really help you much. You are not giving enough information. However you can use the SambaPOS Database backup tool to backup the database and use the same tool to restore it once you get it running on SQL Express.

Backup creates a BAK file (contains MDF/LDF in 1 file).

Restore works with a BAK file, not MDF/LDF.

However, you can still attach your MDF/LDF to the SQL DB Engine Instance as a Database.

##Using SSMS (SQL Server Management Studio)
https://docs.microsoft.com/en-us/sql/relational-databases/databases/attach-a-database


##Using SQLCMD via command line interface (CLI)

https://technet.microsoft.com/en-us/library/ms165673(v=sql.105).aspx

1 Like

Here is the quick conversion instructions to convert MDF to SQL Script. Go through it:
http://sqltechtips.blogspot.com/2018/04/conversion-of-mdf-file-to-sql-file.html