x
login about faq Site discussion (meta-askssc)

Can a database be restored from a remote backup file using t-sql?

In Sql Server 2005, is there any way to restore a database from a backup file with out having to copy the backup file to the server's hard drive first?

E.g., if I have the backup file on one computer, is there a way using t-sql to restore to a database on a different computer without first having to copy the backup file to physically reside on the target machine?

more ▼

asked Sep 10 '10 at 04:50 PM in Default

user-470 gravatar image

user-470
277 12 17 21

(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Absolutely. All of our backups are stored on a network share so the restore command would be like:

RESTORE DATABASE XYZ FROM DISK = N'\\ServerName\SharePath\DatabaseBackupFile.bak'
more ▼

answered Sep 11 '10 at 12:05 AM

Fatherjack gravatar image

Fatherjack ♦♦
38.8k 55 69 104

(comments are locked)
10|1200 characters needed characters left

Sure can although I had an issue with a very large database file. Best of luck.

http://msdn.microsoft.com/en-us/library/ms179313.aspx

Specifying a Universal Naming Convention (UNC) Name

To specify a network share in a backup or restore command, you should use the fully qualified universal naming convention (UNC) name of the file for the backup device. A UNC name has the form \\Systemname\ShareName\Path\FileName.

more ▼

answered Sep 10 '10 at 06:00 PM

Tim gravatar image

Tim
31.5k 20 31 116

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments



Facebook logo Follow Ask SSC on Facebook
Find Ask SSC on Google+
linkedin logo Find us on LinkedIn

Topics:

x1834
x95

asked: Sep 10 '10 at 04:50 PM

Seen: 2651 times

Last Updated: Sep 10 '10 at 04:50 PM

Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.