Below is a Step by step guide on how to migrate files from SQL Compact Edition to SQL Server 2012. Very useful if you have configured SQL Express 2012.
For anyone need help configuring SQL Express 2012 for SambaPOS follow the simple steps on below link: http://www.sambapos.org/en/content/installing-sql-express-2012-sambapos-v3
[Creating the migration file]
Locate the file SambaPOS4.sdf file in SambaPOS folder in My Documents. Copy it and paste it on your C:\ drive. The file should be located here “C:\SambaPOS4.sdf” (This is for easier migration)
Copy the ExportSqlCE40.exe file to the same destination of your SambaPOS4.sdf file. (C:\ExportSqlCE40.exe).( Attached is zipped ExportSqlCE40.exe file, you need to unzip after downloading.)
ExportSqlCE40.zip (43.8 KB)
Open a command prompt window (Windows key + R and type in CMD - open command prompt as Administartor) and make sure you navigate to the folder where both files you copied in step 2 and 4 are pasted. (Type in “cd c:” without quotations)
By this step you should see the command prompt with C:\
Next type this ExportSqlCE40.exe “Data Source=c:\SambaPOS4.sdf” migrate.sql
Program will create the migrate.sql file. after completion head to your C:\ drive and you should see a file named migrate.sql
[Restoring the database to SQL Server]
Open up SQL Server Management Studio Express and connect to your server.
Open up Databases and create a new database called i.e “SambaData2”
Close SQL Server Management Studio and open the file “migrate.sql” created earlier and connect to the server. (double click on migrate.sql to execute)
double click on migrate.sql
connecting to the server.
IMPORTANT: MAKE SURE YOU SELECT ON THE DROPDOWN MENU “SAMBADATA2” LOCATED NEXT TO THE EXECUTE BUTTON!!!
Click on Execute and your database will be restored from SQL compact edition to SQL server 2012.
2 Likes
I have done all there but still i cant find any data in my POS,
Please help
Thanks
Sid
Marza
April 6, 2014, 6:37am
3
Hello,
I guess i have the same problem like you did you manage to fix it.
Regards,Marza
JohnS
April 6, 2014, 7:40am
4
I have written a script to migrate the sdf file to SQL.
This collection of scripts will convert a Compact SQL (*.sdf) database to SQL Express 2012 database and update SambaPOS to use the database.
Requirements
1… SambaPOS should be working using the Compact SQL database -> SambaPOS4.sdf
2… Install SQL Express 2012 exactly as documented here - DO NOT follow step 4. Using SQL Express 2012. and do not run SambaPOS after installing SQL Express.
3… Locate SambaPOS4.sdf and place all of the files from the attached ZIP file into this location. The locat…
@Marza , you can also check following forum for same issue.
can you make sure the port settings and SAMPOS messaging server is configured and running.
[image]
[image]
[image]
Marza
April 6, 2014, 11:02am
6
Only my products and menus are imported, no prices, no printer settings/templates etc
JohnS
April 6, 2014, 11:42am
7
@morshed1 , Message Server has nothing to do with SQL Server. This is a common misconception, and they need to be addresses separately.
@Marza , have you tried my script yet ?
1 Like
Marza
April 6, 2014, 11:50am
8
@JohnS , I’ve tried it, everything worked fine thanks, the only thing my prices and printer templates are missing
JohnS
April 6, 2014, 12:05pm
9
PM me you SDF file. Every SDF I have converted has all the data.
@Marza ,
I am not much experienced in SambaPOS just two weeks i being to this,
Check ur database status is connected.
Same like above reply, messaging server started or not.
Check ur path is correct and make sure u have given the name of database (sambadata2)
1 Like
JohnS
April 6, 2014, 11:09pm
11
@ashrafsidhik ,
Message Server has nothing to do with SQL Express Server.
When you see Message Server Not Connected
it means "Message Server" Not Connected
People are getting confused thinking it means Message : Server Not Connected
Thanks John, I got the point.
hi
i tried all of the steps for a SambaPOS3.sdf database, but it didn’t work for me.
can anyone help?
Thanks
ashrafsidhik:
Check ur path is correct and make sure u have given the name of database (sambadata2)
how do you do this in sambapos v3?
i can’t seem to find the property editor like in you picture.
Sorry for late reply, it is not v3 it is sambapos4!
just the database name is sambadata2
thanks