Copy SQL Server 2005 DB to PDA - is it possible?
-
I'm creating a prototype of a Cf.Net 2.0 PDA app for a prospective client and I've gone through and designed, built and populated a database using SQL Server 2005... and then realised where I really need it is on the PDA! Without going through all the pain of setting up SQL replication is there a way to export a 2005 database to SQL Server Mobile so it results in an .SDF file? TIA for any help... Mike
-
I'm creating a prototype of a Cf.Net 2.0 PDA app for a prospective client and I've gone through and designed, built and populated a database using SQL Server 2005... and then realised where I really need it is on the PDA! Without going through all the pain of setting up SQL replication is there a way to export a 2005 database to SQL Server Mobile so it results in an .SDF file? TIA for any help... Mike
What we used to do in the SQL Server 2000/SQL Server CE 2.0 generation was to design the database as a SQL Server 2000 database in Enterprise Manager, then use the Generate Script feature to produce a suitable script to execute, then remove any features that SQL Server Mobile doesn't support and split the script between statements, since SQL Mobile does not allow multi-statement batches (as far as I know - SQL CE 2.0 did not, as I recall). Scripting the data is trickier - you'll need to generate loads of INSERT...VALUES statements, and I don't think there's a built-in SQL Server tool for doing this. It appears that Management Studio cannot Import Data from a file into a SQL Server Mobile database in the same way that it can for a SQL Server database. You might try using Red Gate's SQL Data Compare[^] tool.
Stability. What an interesting concept. -- Chris Maunder
-
What we used to do in the SQL Server 2000/SQL Server CE 2.0 generation was to design the database as a SQL Server 2000 database in Enterprise Manager, then use the Generate Script feature to produce a suitable script to execute, then remove any features that SQL Server Mobile doesn't support and split the script between statements, since SQL Mobile does not allow multi-statement batches (as far as I know - SQL CE 2.0 did not, as I recall). Scripting the data is trickier - you'll need to generate loads of INSERT...VALUES statements, and I don't think there's a built-in SQL Server tool for doing this. It appears that Management Studio cannot Import Data from a file into a SQL Server Mobile database in the same way that it can for a SQL Server database. You might try using Red Gate's SQL Data Compare[^] tool.
Stability. What an interesting concept. -- Chris Maunder
Thanks Mike - I needed to get it done so I did exactly that... created a script from the main DB, altered it so it ran on SQL CE and then created insert statememts with an excel macro and data copied from the enterprise manager "Open table" grids... works OK but what a ridiculous amount of effort for two products that really should be to do this sort of thing. Perhaps when SQL Everywhere comes out we won't have these issues as, from what I've read, the database is one and the same whether on the PDA or on the desktop/server.... bring it on is all I can say!!
-
Thanks Mike - I needed to get it done so I did exactly that... created a script from the main DB, altered it so it ran on SQL CE and then created insert statememts with an excel macro and data copied from the enterprise manager "Open table" grids... works OK but what a ridiculous amount of effort for two products that really should be to do this sort of thing. Perhaps when SQL Everywhere comes out we won't have these issues as, from what I've read, the database is one and the same whether on the PDA or on the desktop/server.... bring it on is all I can say!!
I think Microsoft are still intending the main use of SQL Server Everywhere Edition to be as a subscriber to a replication publication, so I suspect that there won't be any improvement in the tools in that area. You can contact the SQL Server Everywhere team through their blog's Contact link at http://blogs.msdn.com/sqlservereverywhere/contact.aspx[^].
Stability. What an interesting concept. -- Chris Maunder