SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Backing up & Restoring a DB


Backing up & Restoring a DB

Author
Message
VegasL
VegasL
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1153 Visits: 225
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
Michael Meierruth
Michael Meierruth
SSCertifiable
SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)

Group: General Forum Members
Points: 5352 Visits: 2526
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'.
eklavu
eklavu
SSC-Addicted
SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)SSC-Addicted (480 reputation)

Group: General Forum Members
Points: 480 Visits: 173
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.
VegasL
VegasL
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1153 Visits: 225
Thank you guys. Appreciate it!
jeetsingh.cs
jeetsingh.cs
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1127 Visits: 618
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
Nadrek
Nadrek
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10481 Visits: 2752
Read Gail Shaw's Managing Transactions logs.

Check out Ola Hallengren's maintenance procedures.
kapil_kk
kapil_kk
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10703 Visits: 2778
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/
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search