Hi,
I want to give the user of my application to an option to restore the database from a backup file.. How can i do it... Please guide. i am working on VS 2008 and sql server 2008 windows application
Restore DataBase form
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


Kiran KaraleRank #3,873 · 383 reputationPosted Feb 23, 2012, 8:39 PM EST
New Querty=>
Backup Database Databasename to disk='c:\databasename.bak' // give any path
Restore the Database
restore database Databasename from disk = 'D:\kiran\ databasename .bak'
with move ' Databasename ' to 'd:\kiran\ databasename .mdf',
move ' Databasename_log' to 'd:\kiran\ databasename _log.ldf',
move 'sysft_iitsm_fts' to 'd:\kiran\smartt25' // if use sql 2005 then use this line, in 2008 skip this line
B M SuchitraRank #2,922 · 492 reputationPosted Feb 23, 2012, 8:47 PM EST