Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Take 'Backup' of SQL Server Compact database

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

like image 842
team-ferrari22 Avatar asked Feb 19 '10 07:02

team-ferrari22


1 Answers

Just copy the file. Done.

Quote from Maintaining Databases:

Because SQL Server Compact 3.5 is a file-based database system, you can accomplish many common database tasks such as backing up, restoring, and deleting a database by using the file system APIs.

To back up a database, close all connections to the database, and then copy the .sdf file. To restore a database, copy the .sdf file back to its regular working location. These operations work even if the database is set up for replication. To drop a database, delete the .sdf database file.

like image 177
AngryHacker Avatar answered Sep 21 '22 07:09

AngryHacker