|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Sunday, April 21, 2013 9:55 PM
Points: 17,
Visits: 60
|
|
Hello,
I have a db which I would like to backup and restore.
Currently I go to db, right click tasks and select backup.
This is fine, however I'd like to be able to save a back up to desktop and then once do, if need to how to restore?
Thanks
|
|
|
|
|
SSC-Addicted
      
Group: General Forum Members
Last Login: Sunday, May 05, 2013 10:12 AM
Points: 480,
Visits: 1,604
|
|
Is the sql server instance located on the same computer where you are running SSMS to do the backup?
If yes, then it should be straight forward using the backup dialog pointing it to c:\Documents and Settings\yourprofile\Desktop
If no, then it is a bit tricky. You need to create a share on your computer (in DOS: net share sharename=c:\somefolder). Then use the backup dialogue and in the destination dialog write \\yourcomputername\sharename\my.bak It may be necessary that instead of 'yourcomputername' you put your IP address. At the end remember to do a 'net share sharename /d'.
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Today @ 1:33 AM
Points: 51,
Visits: 146
|
|
1. Goto DB 2. Right click database folder and choose Restore Database 3. Tick "From device" under Specify the source and location of backup sets to restore. 4. Click add on the pop up window. 5 Locate your backup in the folder where you saved your database. (e.g. Documents and Settings\<your profile>\Desktop\<db backup name.>. Make sure your dbbackup contrains .bak extension name. otherwise it will not be display on the pop up window. You will supply the path manually. 6. Click ok button, then ok button then another ok button. 7. in the option menu, choose overwrite existing database (if the db already exist to overwrite the old one) 8. Click ok button and wait for the confirmation that the restoration is successfull.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Sunday, April 21, 2013 9:55 PM
Points: 17,
Visits: 60
|
|
| Thank you guys. Appreciate it!
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 11:06 PM
Points: 179,
Visits: 380
|
|
beside this you can also create a procedure to backup and restore a database where you can take various parameters like path in your case
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Yesterday @ 12:28 PM
Points: 675,
Visits: 2,031
|
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: 2 days ago @ 11:16 PM
Points: 1,061,
Visits: 1,151
|
|
you can also do backup and restore through a sql query...
Backup
Backup Database db_name TO DISK = 'path of the location' WITH FORMAT
RESTORE DATABSE db_name FROM DISK = 'path where your databse file is place' WITH FORMAT
|
|
|
|