x

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, 2010 at 04:50 PM in Default

avatar image

user-470
277 19 19 24

(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, 2010 at 12:05 AM

avatar image

Fatherjack ♦♦
43.7k 79 98 117

(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, 2010 at 06:00 PM

avatar image

Tim
40.4k 39 84 166

(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

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x2018
x122

asked: Sep 10, 2010 at 04:50 PM

Seen: 6087 times

Last Updated: Sep 10, 2010 at 04:50 PM

Copyright 2016 Redgate Software. Privacy Policy