Solved

copy database from sql 2008 to sql 3.5

Posted on 2011-03-13
11
535 Views
Last Modified: 2013-12-27
I want to copy database (table structre and records) from sql server 2008 R2 into SQL Compact edition 3.5.

I use Visual Studio 2008 Professional and Windows Mobile Device Center in development. The device is running Windows 6.1.
0
Comment
Question by:smetechit
  • 7
  • 4
11 Comments
 
LVL 16

Accepted Solution

by:
hjgode earned 500 total points
ID: 35135098
Hello

my first suggestion is to have a sql server 2008 connection and a local sqlce database on the device and then just query the schema and data of the sql2008 server and built up the sqlce database with this data.
On windows mobile with sqlce you can have a local sqlce database (single file with sdf extension) or connect directly to a sql server (2000/2005/2008) using TCP/IP. This would work also with ActiveSync or WMDC connected windows mobile device, as there is passthru support.

Another approach is offered at http://www.codeproject.com/KB/database/SqlCompactCoptUtility.aspx where a desktop appication does convert a sql2005 database to sqlce formatted sdf file.
As sql server 2005 and 2008 should not differ from connection based view, the code should work for sql server 2008 too.

If you use sqlce other than 3.0 and 3.5, you have to change the code to meet your sqlce assemblies version numbers in the code that checks the sqlce assemblies.

Does this help you?

Josef
0
 

Author Comment

by:smetechit
ID: 35135622
Hi hjgode,

I tried the copy utility but it throughs the attached errors , I am not sure if these errors are related to sql server version (I use 2008 but the utility is designed for sql 2005/2000).

Regarding your first suggestion, can you elaborate more how can I add connection to sql 2008 into device and copy the database, I am using Windows Mobile Device Center.

Error.png
Error.txt
0
 
LVL 16

Expert Comment

by:hjgode
ID: 35138853
It is missing a file. Unfortunately I cant read the first line of the JIT exception dialog. As far as I can see, it is looking for MSSql server assembly.

Do you have Sql Server Management Studio installed?

0
 
LVL 16

Expert Comment

by:hjgode
ID: 35140883
The required DLLs (assemblies) are part of Microsoft SQL Server 2008 R2 Shared Management Objects from the Feature Pack.
0
 

Author Comment

by:smetechit
ID: 35147515
The complete errors are listed in the previously attached text file.

0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 16

Expert Comment

by:hjgode
ID: 35149752
Hello

sorry for that, I did not relaize that a txt file was also attached.

But as said, you have to install the SQL Server Management Objects (SMO) of the Feature pack: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ceb4346f-657f-4d28-83f5-aae0c5c83d52

Look for "Microsoft® SQL Server® 2008 R2 Shared Management Objects"
0
 

Author Comment

by:smetechit
ID: 35154121
Hi higode,

I have installed SMO but the error is still existing.
0
 
LVL 16

Expert Comment

by:hjgode
ID: 35157528
I have done an installer for this. Hopefully you are now more successfull. AFAIK only basic types can be copied.

http:// www.hjgode.de/temp/SqlCopy-Release.zip

You still need Microsoft SQL Server Compact 3.5 Service Pack 2 for Windows Desktop
0
 
LVL 16

Expert Comment

by:hjgode
ID: 35163100
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e497988a-c93a-404c-b161-3a0b323dce24

is the link to Microsoft SQL Server Compact 3.5 Service Pack 2

the latest version of the tool is sited at http://www.johnnycantcode.com/page/SQL-Server-to-SQL-Server-Compact-Edition-Database-Copy.aspx

Please let me know, when you downloaded the installer (it installs runtimes too!). Then you may copy the latest exe into the install dir (Program File\Ich...)
I will then delete the installer of my webspace

regards

Josef
0
 
LVL 16

Expert Comment

by:hjgode
ID: 35164237
Hello again

I found one more possible solution: http://www.primeworks-mobile.com/Products/DataPortWizard.html

0
 

Author Comment

by:smetechit
ID: 35204741
The software in the link causes my intermec cn50 device to stop booting Windows and I had to clean boot ir.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now