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
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
B M SuchitraPosted Feb 24, 2012, 1:47 AM
Kiran KaralePosted Feb 24, 2012, 1:39 AM
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