Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Backing up & Restoring a DB Expand / Collapse
Author
Message
Posted Sunday, December 23, 2012 11:27 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, September 13, 2013 8:55 PM
Points: 18, Visits: 68
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
Post #1399762
Posted Monday, December 24, 2012 3:13 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, April 17, 2014 4:00 AM
Points: 522, Visits: 2,013
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'.
Post #1399852
Posted Tuesday, December 25, 2012 10:33 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, August 22, 2013 9:07 PM
Points: 53, Visits: 153
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.
Post #1400145
Posted Wednesday, December 26, 2012 8:55 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, September 13, 2013 8:55 PM
Points: 18, Visits: 68
Thank you guys. Appreciate it!
Post #1400440
Posted Monday, February 18, 2013 6:20 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 5:15 AM
Points: 251, Visits: 539
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
Post #1421178
Posted Tuesday, February 19, 2013 8:25 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 8:46 AM
Points: 845, Visits: 2,331
Read Gail Shaw's Managing Transactions logs.

Check out Ola Hallengren's maintenance procedures.
Post #1421674
Posted Tuesday, February 19, 2013 11:26 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 12:14 AM
Points: 1,870, Visits: 2,276
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



_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
Post #1421934
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse