Installing SQL Server on a Windows Embedded device

Microsoft SQL Server is not included by the manufacturer on most Windows Embedded and Windows Mobile devices, so if your IWS project requires SQL Server, then you may need to download and install it on the device yourself.

Before you proceed, check the device manufacturer’s documentation to see if the device includes Microsoft SQL Server. If it does, then you should not need to install the software again unless you have problems with it.

If it does not, then at least verify the device meets the system requirements for running a IWS project and note the device processor.

Because only the device manufacturer can permanently “install” software on the device using Platform Builder, what you will actually do is copy CAB files to the device’s non-volatile memory and then configure the device to load those files every time it starts up.

Note: At the time of this writing, the latest stable version of SQL Server is Microsoft SQL Server Compact Edition 3.5 Service Pack 2.

  1. On your desktop, download Microsoft SQL Server Compact Edition from the following website: http://www.microsoft.com/sqlserver/en/us/editions/compact.aspx
  2. Extract and install the software on your desktop. A new directory is created containing the Microsoft SQL Server files, including files that are customized for different device processors.
  3. Open the directory: C:Program FilesMicrosoft SQL Server Compact Editionv3.5Deviceswce500
  4. In the directory, select the correct sub-directory for your device processor. For example, if your device uses an x86 processor, then select the x86 sub-directory.
  5. In the sub-directory, select the CAB files that need to be copied to your device. Continuing with the x86 example, select the following files:
    • sqlce.dev.ENU.wce5.x86.CAB
    • sqlce.repl.wce5.x86.CAB
    • sqlce.wce5.x86.CAB
  6. Copy the CAB files to your device’s non-volatile memory and then note where they are located. The exact method you use to copy files to the device depends on your setup. You might use desktop syncing or a network connection or a USB flash drive. Check the manufacturer’s documentation to see what methods are available.
  7. On your desktop, create a new text file named install.bat.
  8. Edit install.bat to create a batch script that loads the CAB files on startup. Continuing with the x86 example, edit the file to contain the following code:
      wceload /noui /delete 0 "filepathsqlce.dev.ENU.wce5.x86.CAB"  wceload /noui /delete 0 "filepathsqlce.repl.wce5.x86.CAB"  wceload /noui /delete 0 "filepathsqlce.wce5.x86.CAB"  

    …where filepath is the location to which you copied the CAB files. For more information, see the MSDN article about the Wceload tool.

  9. Copy install.bat to your device’s WindowsStartup directory. If the device does not have a WindowsStartup directory, then follow the manufacturer’s documentation for configuring startup items.
  10. Restart the device. If you have correctly selected and installed the files, then SQL Server will run on startup on you should be able to access it with your IWS project.

Installing SQL Server on a Windows Embedded device