Follow sqlserver-dba.com

Subscribe to RSS feed  Follow @jackvamvas - Twitter

*Use the Comments section for questions

SQLServer-DBA.com Links

Dba_db2_button

dba-ninja.com

SQL Server DBA Jobs

How to take a SQL Backup and Restore from UNC

30 March,2013 by Tom Collins

A UNC (Universal Naming Convention)  mounts at any point on a logical drive. A UNC path is required if a DBA creates a  backup and restores from a UNC path.

I use UNC paths if disk space is limited on the server , and a storage administrator isn’t available to add another drive to the server with disk attached. I’ll create a  network share on another sever , create the SQL Server database backup , and  restore from UNC.

It can be much slower than straight to disk attached but it gets the job done.

--- Backup database to a UNC device . Note: \\server_name\drive_letter\path\file_name
 backup database My_DB to disk = '\\server1\H$\temp_backups\MY_DB.bak'


---Create a backup device . Useful if doing a UNC restore 
EXEC master.dbo.sp_addumpdevice  @devtype = N'disk', @logicalname = N'test', @physicalname = N'\\server1\temp_backups\MY_DB.bak'



-- restore from UNC
RESTORE DATABASE MY_DB
FROM DISK = '\\Server1\SomeShare\MyDatabase.bak'
WITH REPLACE, RECOVERY

 Read More

Backup file information needed for RESTORE - SQL Server DBA

SQL Server backup review with Powershell - SQL Server DBA

Database backup does not cause blocking

SQL Server – Predict the database backup size




Author: Tom Collins (http://www.sqlserver-dba.com)


Share:

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment on How to take a SQL Backup and Restore from UNC


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer