At my last project, I was forced to write two functions for Backup and Restore SQL Express 2005 in a windows application. Application connect to database with AttachDbFilename mode. ( I did not use " Initial Catalog " in connection string for some reasons...