Connecting to the Standard 2009 Database with XPeCMD

If you are a fan of automating as many build processes as possible when creating Windows Embedded images then you are probably familiar with XPeCMD, a script file that allows you to do many tasks programmatically instead of through Target Designer. This file is located in “\Program Files\Windows Embedded\bin" on the development computer.

Windows Embedded Standard 2009 includes SQL Express 2005 as part of its installation DVD and there may be some cases where the instance name for the SQL database is different from what you might have been familiar with in XP Embedded. SQL Express 2005 defaults to a named instance, but in some cases you may have selected a named instance. More info can be found here. This could cause issues if you are used to using the command "dbo local" in XPeCMD to connect to your database. Here are the guidelines:

  • If you installed Standard 2009 with the “default SQL instance”, use ”dbo local” 
  • If you installed Standard 2009 with a ”named SQL instance”, use “dbo <Machine name>\<instance name>
    to connect to the db. For example, "dbo MyMachine\SQLEXPRESS".

If you don’t remember how the SQL instance was configured you can find the info in the following registry key on the development computer:

HKEY_CURRENT_USER\Software\Microsoft\Windows Embedded : ServerName

- Lynda

Technorati Tags: XPe,Embedded,Standard 2009,XPeCMD