Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Nakul Vachhrajani is a Technical Specialist & Systems development professional with iGATE. He holds a MCTS (SQL Server 2008: Implementation & Maintenance)
Browse by Tags · View All
#SQLServer 241
SQL Server 240
Administration 207
DBA 196
Tips 185
Development 185
T-SQL 180
#TSQL 178
Guidance 122
Tools and Utilities 112

Archive · View All
April 2011 14
March 2012 11
December 2011 11
March 2011 11
December 2012 10
October 2011 10
January 2011 10
January 2013 9
November 2012 9
October 2012 9

#0171-SQL Server-Scripts-Backup and Restore a database over a network using UNC paths

Jun 21 2012 12:00AM by Nakul Vachhrajani   

I am sure this post would ring a bell with most development teams. Development servers are generally constrained for space. Whenever a development team requests more hardware, be it in terms of a new machine or even additional storage space, I am sure that most IT departments would have told them “Why do you need all these servers? You already have n number of servers, which are more than the number of people on the team!”

Ultimately, this results in lack of disk space to store both a database and it’s backup on the same drive. In fact, we had this issue some time ago, wherein we had to restore a reasonably large database 50GB+. Both the backup and the database simply could not reside on the same server due to disk space issues.

So, we decided to place the backup file on a network share, map it to a drive on the server and restore the database from there. However, that just wouldn’t work. Attempting to restore through the SSMS results in the following error:

image

But, as they say – “Where there is a will, there is a way.” The core issue here is that mapped network drives are not supported by SQL Server. UNC paths however, are a different story.

SQL Server fully supports backups & restores over UNC paths. There are 2 methods that you can use:

  1. Directly type the UNC path where the backup needs to be taken/restored from
  2. Create a backup device pointing to the UNC path and then backup to/restore from this device

After looking at how easy and convenient it is to use UNC paths with SQL Server, our entire team has started using them. Here are a some scripts that you may be interested in:

  1. Backup Databases across the network: http://beyondrelational.com/modules/30/scripts/485/scripts/15042/backup-database-across-the-network.aspx
  2. Restore Databases across the network: http://beyondrelational.com/modules/30/scripts/485/scripts/15043/restore-databases-from-a-backup-file-across-a-network.aspx

There are a couple of security considerations that you need to take care about. They are available in the following MS KB article: http://support.microsoft.com/kb/207187

These scripts are available in the Scripts module on BeyondRelational.com (http://beyondrelational.com/modules/30/default.aspx?s=stream&tab=scripts). If you haven’t been to the Scripts module page, do pay it a visit – you will find a lot of useful scripts that you can customize for your use.

Until we meet next time,

Be courteous. Drive responsibly.

Tags: #SQLServer, SQL Server, Tips, Administration, DBA, T-SQL, #TSQL, SSMS, HowTo


Nakul Vachhrajani
4 · 33% · 10677
4
 
0
Lifesaver
 
 
0
Learned
 
0
Incorrect



Submit

4  Comments  

    1. Don't back up databases to the same server. Horrible idea in production, even worse in development.

    2. The Sevice Account SQL Server runs under will have to be a domain account. That domain account will need to be granted access to the share AND the directory in the file system. IIRC, The account will need FULL or MODIFY permission to the directory.

    commented on Jun 21 2012 7:00AM
    Marc Jellinek
    97 · 2% · 556
  • @Marc: Generally, what I have seen is that when database backups are taken in development environments, they are either because the server is being rebuilt or because the database needs to be shared with some other team for their (generally invasive) development and testing. This is one of the reasons why we generally keep the databases in our development environment in SIMPLE recovery.

    If something unforeseen does happen, the database can be rebuilt using the scripts and test data generation plans stored safely away under source control.

    For my academic interest, why do you say that in such cases, taking database backups one the same server is bad for the development environment?

    (I completely support your views that its a horrible idea for production instances. Also, the requirements around the SQL Server account are available in the Books-On-Line entry I referenced in the post).

    commented on Jun 22 2012 11:54AM
    Nakul Vachhrajani
    4 · 33% · 10677
  • The reason why backups should never be stored on the same server, regardless of prod vs dev, is the same: if you lose the server, you lose the backups. In the case of dev, you lose the work of your developers: a cost. While object definitions are generally stored under source control, data generally is not. Nor are dependencies (base table definitions and view definitions may be under source control, but the fact the tables need to be created before the views is not.

    It is much easier to have a solid backup/restore strategy in place. You can also easily seperate object definitions and data storage with the use of filegroups, then using filegroup backups (and if necessary, piecemeal restores) to mitigate risk.

    commented on Jun 22 2012 12:20PM
    Marc Jellinek
    97 · 2% · 556
  • I see your point now, Marc. Thank-you!

    commented on Jun 22 2012 1:13PM
    Nakul Vachhrajani
    4 · 33% · 10677

Your Comment


Sign Up or Login to post a comment.

"#0171-SQL Server-Scripts-Backup and Restore a database over a network using UNC paths" rated 5 out of 5 by 4 readers
#0171-SQL Server-Scripts-Backup and Restore a database over a network using UNC paths , 5.0 out of 5 based on 4 ratings
    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]