CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Posts
    17

    Take 'Backup' of SQL Server Compact database

    Hi All,

    Is it possible to take Backup of SQL Server Compact database (i.e. *.sdf) and Restore the same.

    Regards.

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: Take 'Backup' of SQL Server Compact database

    Quote Originally Posted by team_ferrari22 View Post
    Is it possible to take Backup of SQL Server Compact database (i.e. *.sdf) and Restore the same?
    Well...you probably have to think about SQL Server Ce in different way. All you have is the data file (*.sdf) and some libraries to access the data. You connect to the database by specifying the file. You don't have a database server in the classical sense. So the concept of backup and restoring doesn't apply. If you want to back up just make a copy of the file. When you want to restore overwrite the current file with the copy of the previous. Maybe you're looking for a way to automate this...but all you're doing is standard operations (copy, paste, move) on an file with an SDF extension.

  3. #3
    Join Date
    Jan 2010
    Posts
    17

    Re: Take 'Backup' of SQL Server Compact database

    Thank you for your reply.

    One more doubt we have, that is can we restore backup file taken by SQL Server (i.e.*.bak) to SQL Server Compact database or convert .bak file to .sdf file in any way? or any tools available for such activities?

    Regards

  4. #4
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: Take 'Backup' of SQL Server Compact database

    I would think that you can use Sql Server Management Studio to accomplish some of what you want. I don't think you can make a .bak into a .sdf. The .bak would have features that are not supported in SQL Server CE. But perhaps you can use the Import/Export utility to export the data from one database to the SQL Server CE. I've never tried it but its worth looking at...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured