<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Information Technology Solutions</title>
	
	<link>http://itsolutionsinc.net</link>
	<description>727.895.3279</description>
	<lastBuildDate>Wed, 22 Feb 2012 15:02:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/itsolutionsinc/gXRI" /><feedburner:info uri="itsolutionsinc/gxri" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>27.770955</geo:lat><geo:long>-82.639319</geo:long><item>
		<title>Rethinking SQL Server Backups</title>
		<link>http://feedproxy.google.com/~r/itsolutionsinc/gXRI/~3/IJDZBDw30lg/</link>
		<comments>http://itsolutionsinc.net/index.php/rethinking-sql-server-backups/#comments</comments>
		<pubDate>Wed, 15 Feb 2012 22:19:15 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Databases]]></category>

		<guid isPermaLink="false">http://itsolutionsinc.net/?p=365</guid>
		<description><![CDATA[This is a re post of an excellent article on SQL Technology &#38; backup strategies from Appassure! Chapter 5: Rethinking SQL Server Backups More and more companies are using Microsoft SQL Server these days—and in many cases, they don’t even realize it. While plenty of organizations deliberately install SQL Server, many businesses find themselves using [...]]]></description>
			<content:encoded><![CDATA[<h2><em>This is a re post of an excellent article on SQL Technology &amp; backup strategies from Appassure!</em></h2>
<h1>Chapter 5: Rethinking SQL Server Backups</h1>
<div id="wrapper_ebook">
<div id="content">
<p align="right"><a href="http://www.appassure.com/wp-content/uploads/2009/12/Chapter-5.pdf"><img src="http://www.appassure.com/wp-content/uploads/2009/08/download-pdf.jpg" alt="Download PDF Version" border="0" /></a></p>
<p>More and more companies are using Microsoft SQL Server these days—and in many cases,<br />
they don’t even realize it. While plenty of organizations deliberately install SQL Server,<br />
many businesses find themselves using SQL Server as a side effect, because SQL Server is<br />
the data store for some line-of-business application, technology solution, and so on. In fact,<br />
“SQL sprawl” makes SQL Server one of the most challenging server products from a backup<br />
perspective: Not only is SQL Server challenging in and of itself, but you wind up with tons<br />
of instances!</p>
<p>Here’s what I see happening in many organizations: The company has one or more “official”<br />
SQL Server installations, and the IT team is aware of the need to back up these instances on<br />
a regular basis. But there are also numerous “stealth” installations of SQL Server, often<br />
running on the “Express” edition of SQL Server, that the IT team is unaware of. The data<br />
stored in these “stealth” installations is no less mission critical than the data in the “official”<br />
installations, but in many cases, that data isn’t being protected properly. Dealing with this<br />
“sprawl” is just one of the unique challenges that Backup 2.0 faces in SQL Server.</p>
<h1>Native Solutions</h1>
<p>SQL Server has always offered a native application programming interface (API) for<br />
backing up databases. In fact, SQL Server has long been one of the few Microsoft server<br />
applications that natively supports tape backup, without using Windows’ own backup<br />
utility. The native backup toolset is actually quite robust, supporting features like<br />
compression (highlighted in Figure 5.1), encryption, and so forth.</p>
<p><img src="http://www.appassure.com/wp-content/uploads/2010/ebooks_imgs/book5/Untitled-1.png" alt="" /><br />
Figure 5.1: SQL Server’s native backup interface..</p>
<p>To understand SQL Server’s native backup technology, you need to first know a bit about<br />
how SQL Server works under the hood.</p>
<h2>How SQL Server Works</h2>
<p>SQL Server stores things on disk in 8KB chunks called pages. It also manipulates those<br />
same 8KB chunks in memory, meaning the smallest unit of data SQL Server works with is<br />
8KB.</p>
<p>When data is written to disk, an entire row of data must fit within that 8KB page. It’s<br />
possible for multiple rows to share a page, but a row cannot span multiple pages. So, if a<br />
Customers table has columns for Name, Address, City, State, and Phone, then all that data<br />
combined must be less than 8KB. An exception is made for certain data types—such as<br />
binary data like photos, or large gobs of text—where the actual page only contains a<br />
pointer to the real data. The real data can then be spread across multiple pages, or even<br />
stored in a file. SQL Server gathers all these 8KB pages into a simple file on disk, which<br />
usually has either an .MDF or an .NDF filename extension.</p>
<p>When SQL Server is told to do something, it’s by means of a query, written in the Structured<br />
Query Language (SQL) syntax. In the case of a “modification” query, SQL Server modifies<br />
the pages of data in memory. But it doesn’t write those modifications back out to disk yet,<br />
as there might be additional changes coming along for those pages and the system load<br />
might not offer a good disk-writing opportunity right then. What SQL Server does do,<br />
however, is make a copy of the modification query in a special log file called the transaction<br />
log. This file, which has an .LDF filename extension, keeps a record of every transaction SQL<br />
Server has executed.</p>
<p>Eventually—maybe a few seconds later—SQL Server will decide to write the modified<br />
pages out to disk. When it does so, it goes back to the transaction log and “checks off” the<br />
transaction that made the modifications—essentially saying, “Okay, I made that change and<br />
it’s been written to disk.” That way SQL Server knows that the change is safe on disk.</p>
<p>In the event that SQL Server crashes, it has an automated recovery mode that kicks in when<br />
it starts back up. It goes straight to the transaction log and looks for uncommitted<br />
transactions—those that have not yet been “checked off.” It knows that the “checked off”<br />
transactions are safe on disk; anything else had not been written to disk and was still<br />
floating around in memory when the server crashed. So SQL Server reads those<br />
transactions out of the log, re-executes them, and immediately writes the affected pages to<br />
disk. This process allows SQL Server to “catch up” with any in-progress work, and ensures<br />
that you never lose any data—provided your disk files are okay, of course.</p>
<p>Think about this important fact: EVERYTHING that happens in SQL Server happens only<br />
through the transaction log, and SQL Server can re-read the log to repeat whatever has<br />
happened. This process makes nearly everything that SQL Server does possible.</p>
<h2>How SQL Server Native Backup Works</h2>
<p>SQL Server’s native backup system works in conjunction with the transaction log.<br />
Essentially, there are two types of backup SQL Server can make: data backups and log<br />
backups. Data backups are, as you might suspect, of the database itself. These are done in a<br />
Backup 1.0-style manner, grabbing a snapshot of the data as it sits during the backup. Log<br />
backups grab the contents of the transaction log.</p>
<p>SQL Server’s native backup capabilities include the ability to back up a database while it’s<br />
in use, although database performance can slow slightly while a backup operation is<br />
underway. The ability to back up an in-use database means that SQL Server is less impacted<br />
by “backup windows” than many other server products, and it means that you’re a bit less<br />
tied to the Backup 1.0-model of only grabbing backups while the data isn’t being used.</p>
<p>But that doesn’t mean SQL Server is entirely free of backup problems and challenges.</p>
<h1>Problems and Challenges</h1>
<p>There are a few distinct challenges presented by traditional SQL Server backup techniques:</p>
<ul>
<li><strong>Sprawl</strong>. As I mentioned earlier, most organizations have a lot more SQL Server<br />
installations than they often realize, and backing up them all can be painful. In some<br />
cases, particularly with the “Express” editions often embedded into line-of-business<br />
applications and IT tools, SQL Server is running on a client computer that isn’t being<br />
treated like a server in terms of backup and recovery.</li>
<li><strong>Snapshots</strong>. Just like any Backup 1.0 scenario, SQL Server backups are built around<br />
the idea of point-in-time snapshots. As I’ll describe in a bit, SQL Server does offer<br />
some unique abilities that let you take more snapshots more frequently, but you’ll<br />
always have a certain amount of data at risk.</li>
<li><strong>Recovery times</strong>. Although SQL Server can be pretty flexible in how it makes you do<br />
backups, restoring is still a time-consuming operation. So time consuming, in fact,<br />
that some companies have created tools that can “attach” a database backup to SQL<br />
Server, allowing the backup data to be queried without actually having to restore<br />
the database. This trick is useful for things like change control, but it doesn’t help<br />
from a backup and recovery perspective simply because the attached backup is<br />
read-only.</li>
<li><strong>Transaction logs</strong>. In SQL Server, backups are intimately tied to the transaction log,<br />
and backups are required in order to keep the transaction log from growing larger<br />
and larger. Any backup plan that doesn’t use the native APIs needs to deal with this<br />
fact.</li>
</ul>
<p>Any proposed backup solution that does not use SQL Server’s native APIs will be<br />
challenging. In fact, most third-party backup solutions are simply agents that sit on top of<br />
SQL Server’s native APIs! This setup ensures that SQL Server’s internal needs—like the<br />
transaction log—are taken care of, but it also has historically limited third-party solutions<br />
to the same basic feature set as SQL Server’s native capabilities. Most third-party SQL<br />
Server backup solutions are really little more than an agent that takes data from SQL<br />
Server’s native APIs, and transmits that data across the network.</p>
<h1>In the Old Days</h1>
<p>So how has SQL Server traditionally been included in a backup and recovery plan? Let’s<br />
consider some of the techniques, scenarios, and tools that are common in the Backup 1.0<br />
world.</p>
<h2>Backup Techniques</h2>
<p>SQL Server natively offers three types of backup. I know I said two earlier, but hear me out:</p>
<ul>
<li>Full Backup. This is a complete backup of the entire database. Once made,<br />
committed transactions in the transaction log are cleared, a process called log<br />
truncation; this is what keeps transaction logs from growing forever.</li>
<li>Differential Backup. This is also a backup of the database, but only the data that<br />
changes since the last full backup is included. Again, the transaction log is truncated.</li>
<li>Transaction Log Backup. This doesn’t grab any of the actual data; it simply grabs<br />
the current state of the transaction log—and then truncates that log.</li>
</ul>
<p>So two kinds of data backup and a log backup. Although SQL Server can back up an active<br />
database, it’s not something you’d do during peak database usage due to performance<br />
concerns, so full and even differential backups are still usually done during off-peak<br />
periods or during an evening or weekend maintenance window. Because it can be difficult<br />
to get a nightly full backup of large databases in that window, administrators typically<br />
resort to a tiered backup plan—grabbing full backups on the weekends, for example, and<br />
differentials each evening. To help reduce the amount of at-risk data, transaction log<br />
backups can be made periodically throughout the day. These backups are very fast and<br />
offer little performance impact, so a practical backup plan might look something like the<br />
one in Figure 5.2.</p>
<p><img src="http://www.appassure.com/wp-content/uploads/2010/ebooks_imgs/book5/Untitled-2.png" alt="" /><br />
Figure 5.2: Typical SQL Server backup plan.</p>
<p>With this plan, the maximum amount of at-risk data is about an hour, as that’s the interval<br />
between transaction log backups. Of course, in a busy database, an hour can be a lot of data!<br />
Reviewing our manifesto for Backup 2.0:</p>
<p>Backups should prevent us from losing any data or losing any work, and ensure that<br />
we always have access to our data with as little downtime as possible.</p>
<p>An hour of at-risk data certainly doesn’t prevent us from “losing any data or losing any<br />
work.” In addition, the restore scenario associated with this kind of backup plan is, as you<br />
shall see, hardly conducive to “as little downtime as possible.”</p>
<h2>Restore Scenarios</h2>
<p>SQL Server recovery can be a time-consuming thing. Essentially, you have to start with<br />
your most recent full database backup, then add on the most recent differential and every<br />
transaction log backup made since then.</p>
<p>In fact, you have to be very specific about what you’re doing when you conduct a restore—<br />
an aspect of SQL Server that I’ve frankly seen a lot of administrators mess up pretty badly.<br />
If you conduct a normal, full database restore, SQL Server will by default put the recovered<br />
database online as soon as it’s done with the restore operation. If you still have a<br />
differential or some log backups to apply, you’re out of luck; you have to start the restore<br />
over. The trick is to tell SQL Server, as you’re restoring the full backup, that you have more<br />
files to restore. You continue telling it that until you restore the last transaction log backup,<br />
at which time you tell SQL Server that it’s safe to start recovery. Then SQL Server will start<br />
applying the differential, then the transaction log backups, and then your database will be<br />
ready to use. “As little downtime as possible” isn’t very little, in most cases, and you’ll still<br />
be missing any changes that occurred after the most recent transaction log backup.</p>
<div>
<p>SQL Server Recovery</p>
<p>For a large database, SQL Server’s recovery time can be quite lengthy. Let’s<br />
say you use the backup plan shown in Figure 5.2, and something goes wrong<br />
at 4pm on Friday afternoon. You’ll have a full backup from the prior<br />
weekend, Thursday night’s differential—which may be quite large, since it<br />
contains all the changes from the full backup up to Thursday night—and<br />
hourly transaction log backups.</p>
<p>Not only do you have to wait for all those files to stream off tape or wherever<br />
you store them, you have to wait for SQL Server to work through them. It has<br />
to apply the differential backup to the full backup, then it has to replay each<br />
individual transaction from every single transaction log—in essence, it has to<br />
re-perform all the work that was done all day Friday. For a large, busy<br />
database, it may be a long time before the database is ready to use.</p>
<p>&nbsp;</p>
</div>
<p>SQL Server doesn’t natively support single-object restores. What you can do is restore a<br />
backup to a different database, then manually copy any objects you want restored from that<br />
backup. This lets you recover single stored procedures, tables, or even rows of data—<br />
provided you know how to do so manually.</p>
<p>SQL Server does support point-in-time recovery, with the obvious caveat that it can’t<br />
restore to a point in time later than your most recent backup. Point-in-time recovery only<br />
works with transaction log backups because transactions in the log are time-stamped. If<br />
you discard Thursday’s transaction log backups after making a differential backup on<br />
Thursday night, then the first point in time you can recover to is the time of that Thursday<br />
night differential. This actually makes backup management tricky because to enable<br />
maximum point-in-time recovery, you have to keep a lot of files hanging around: full<br />
backups, every night’s differential, every hour’s transaction log, and so forth.</p>
<p>Consider this scenario: You’re using the example backup plan from Figure 5.2, which<br />
entails a weekly full, nightly differential, and hourly transaction log backups. Let’s say you<br />
keep 3 weeks’ worth of backups, and Week 3 is the most recent set. It’s Friday afternoon,<br />
and you realize someone deleted a critical stored procedure. You need to recover the<br />
database to the previous Wednesday (Week 2) afternoon; Figure 5.3 illustrates the files that<br />
you have on-hand and which ones you’ll have to restore.</p>
<p><img src="http://www.appassure.com/wp-content/uploads/2010/ebooks_imgs/book5/Untitled-3.png" alt="" /><br />
Figure 5.3: Sample recovery plan.</p>
<p>So, that’s:</p>
<ul>
<li>The beginning-of-Week-2 full backup</li>
<li>The Tuesday night differential from Week 2</li>
<li>The Wednesday transaction log backups up to the point Wednesday afternoon you<br />
want to recover to</li>
</ul>
<p>That’s six or so files to recover, and then you wait for SQL Server to sort it all out. In total,<br />
you’ll be keeping something like 140 files lying around, assuming you take a transaction log<br />
backup eight times a day (once every hour during the normal working day).</p>
<h2>Disaster Recovery</h2>
<p>SQL Server doesn’t offer any kind of native disaster recovery capabilities. Essentially, if you<br />
lose an entire server, you’ll have to recover Windows, install SQL Server, and then start<br />
restoring SQL Server backups to bring your databases as up to date as possible. Traditional<br />
third-party imaging software isn’t effective because it’s difficult to image an active SQL<br />
Server installation, and because imaging doesn’t always work well with SQL Server’s native<br />
backup capabilities—meaning it can be tricky to restore an image and then also restore<br />
normal SQL Server backups to bring your databases more up to date.</p>
<p>In short, let’s hope you don’t lose an entire SQL Server.</p>
<p>In fact, whole-server disaster recovery for SQL Server is so unsatisfying that Microsoft has<br />
made a considerable investment in SQL Server high-availability features that try to reduce<br />
the need to ever do a whole-server recovery. Some options include:</p>
<ul>
<li><strong>Transaction Log Shipping</strong>. The idea here is to start off with two servers that have<br />
an identical copy of a database, then “ship” the transaction logs from the active<br />
server to the “hot spare” server. The spare re-plays the transactions to bring its copy<br />
of the database up to date; the theory is that if the main server dies, the hot spare<br />
can be brought it to replace it.</li>
<li><strong>Database Mirroring</strong>. Essentially the same idea as transaction log shipping, only the<br />
“hot spare” is kept more up to date and can take over automatically if the main<br />
server dies.</li>
<li><strong>Clustering</strong>. Utilizing Windows’ native clustering capabilities, this provides a<br />
completely redundant server with direct access to the same database files as the<br />
“main” server.</li>
</ul>
<p>All of these options require additional SQL Server installations and hardware (or virtual<br />
servers), and they’re all designed to handle a complete-failure scenario; none of these<br />
actually provides for point-in-time recovery capabilities, so they’re to be used in addition to<br />
normal backup techniques. It can get pretty expensive, especially for smaller and midsize<br />
companies who may not be able to afford this level of recoverability—at least in a Backup<br />
1.0 world.</p>
<h2>Backup Management</h2>
<p>I touched on this earlier, but the short message is that SQL Server backup management can<br />
be pretty painful, unless you’re only worried about restoring the database to its most<br />
recent state. In that case, you keep the most recent full backup, most recent differential, and<br />
all transaction logs since the differential; that’s still a lot of files to maintain but it’s a lot<br />
less than trying to keep a few weeks’ worth of files.</p>
<p>I once had a job where we needed to be able to restore the database to any point in time for<br />
3 months. You can imagine the number of files we had to maintain; I think it was close to<br />
600 backup files, all floating around on different tapes, some of which had to be rotated offsite—<br />
it was a nightmare and just describing it is giving me unpleasant flashbacks. In fact, it<br />
was at that exact point in time that I started to realize that the Backup 1.0 way of doing<br />
things was not very efficient—especially because managing that many files still left us atrisk<br />
for an hour or more of data and work.</p>
<h1>Rethinking Server Backups: A Wish List</h1>
<p>So how can Backup 1.0 be improved from a SQL Server perspective? There’s certainly<br />
plenty of room for improvement based on the traditional techniques and approaches I just<br />
discussed.</p>
<h2>New and Better Techniques</h2>
<p>The whole idea of being able to make transaction log backups to have less data at-risk is<br />
wonderful, but it is ultimately a kludge. It’s a workaround to the snapshot-oriented<br />
approach of Backup 1.0; I’ve said it before and I’ll say it again here: Backups should be<br />
continuous. It’s not practical to continually make transaction log backups, and that’s the<br />
best SQL Server can offer; that means we have to move outside of the native APIs. That’s<br />
scary, I know, because so much of SQL Server depends on folks using those native APIs. But<br />
stick with me.</p>
<p>If we acknowledge that SQL Server’s native APIs aren’t going to give us frequent-enough<br />
backups, we need to look at other ways of getting to the data. Going through SQL Server is<br />
not the answer because SQL Server doesn’t have the bandwidth to feed us any kind of<br />
continuous data stream. Instead, we need to grab that data directly from the operating<br />
system (OS), as the data hits the disk. Keep in mind: As complicated as SQL Server is,<br />
ultimately it’s all just bits on disk. There’s no reason we couldn’t have a Backup 2.0-style<br />
agent sitting on the SQL Server computer, grabbing disk blocks as SQL Server writes<br />
changes to the disk.</p>
<p>Clever readers will have spotted a problem with this theory, from my explanation on how<br />
SQL Server works:</p>
<p>When SQL Server is told to do something, it’s by means of a query, written in the<br />
Structured Query Language (SQL) syntax. In the case of a “modification” query, SQL<br />
Server modifies the pages of data in memory. <strong>But it doesn’t write those<br />
modifications back out to disk yet</strong>, as there might be additional changes coming<br />
along for those pages and the system load might not offer a good disk-writing<br />
opportunity right then.</p>
<p>Oops. If SQL Server doesn’t write the data to disk quickly, then that data is at-risk because<br />
all we’re grabbing are the changes that actually make it onto the disk. But the answer to<br />
this potential problem also lies in the very way that SQL Server works:</p>
<p>What SQL Server does do, however, is make a copy of the modification query in a<br />
special log file called the transaction log. This file, which has an .LDF filename<br />
extension, keeps a record of every transaction SQL Server has executed.</p>
<p>The transaction log itself is just a file on disk; Microsoft knows perfectly well that any data<br />
living entirely in memory is always at-risk, and so the transaction log’s entries are written<br />
to disk immediately. All our agent would need to do is also grab the changes to the<br />
transaction log. Then, in a failure, we’d simply restore the database, restore the transaction<br />
log, and let SQL Server’s nature take its course.</p>
<h2>Better Restore Scenarios</h2>
<p>The restore scenarios in a Backup 2.0 world would be vastly improved. For one, the<br />
concept of Backup 2.0 involves continuously streaming changed disk blocks to some central<br />
repository; that being the case, you’d simply select the exact point in time you wanted to<br />
restore to, then stream those disk blocks right back to where they came from. You might<br />
have to shut down SQL Server while you did that, but you might not; programmers can get<br />
pretty clever at manipulating SQL Server, and SQL Server itself is pretty open to<br />
manipulation in this regard.</p>
<p>Suddenly, no more worrying about full backups, differentials, and transaction logs. You<br />
don’t care about the files per se; you only care about the disk blocks from the active<br />
database and log files. You’re not making backups in the SQL Server sense of the term;<br />
you’re actually just putting the computer’s disk back to the condition it was at a certain<br />
point in time. SQL Server never actually enters its “recovery mode,” because you’ve not<br />
restored any files in the SQL Server fashion. SQL Server simply resumes working with the<br />
database and log files just as it normally works with them.</p>
<p>This entire idea, which is at the heart of Backup 2.0, took me a while to really sort out in my<br />
mind. In the end, everything we know about backups is wrong, which is why I chose to use<br />
the term “Backup 2.0.” This is an entirely different way of looking at things.</p>
<p>What about single-object recovery? That would still be tricky. Backup 2.0 will certainly let<br />
us restore a single database, rather than an entire server, if desired. But keeping track of<br />
which disk blocks within a database file go with a particular stored procedure, for<br />
example—that would probably be impossible. It certainly sounds difficult. But a Backup 2.0<br />
solution should allow us to quickly restore a database to a different location—after all, a<br />
database is just a bunch of disk blocks, and they shouldn’t care where they wind up—and<br />
we could use SQL Server’s native tools to script out a stored procedure and then run that<br />
script on our production database, or use SQL Server tools to just copy database objects<br />
like users or whatever from one database to another.</p>
<div>
<p>Single SQL Objects: Tricky, Tricky</p>
<p>Part of the reason it’s so tricky to recover a single SQL Server database object<br />
is that SQL Server stores objects—like stored procedures—as text definitions<br />
within a set of system tables inside the database. In other words, objects are<br />
externally indistinguishable from data; in most regards, objects are data.</p>
<p>A useful tool to have handy, then, is some kind of SQL Server comparison<br />
tool; use your favorite search engine to look for “sql server diff” and you<br />
should find several. These tools compare two databases—like a restored<br />
database and an in-production version—and show you the differences. In<br />
most cases, differences can be “forwarded” into the other database, making it<br />
easier to spot the exact differences between a restored database and its live<br />
counterpart, and to “restore” specific objects from the restored database into<br />
the live database.</p>
<p>Some Backup 2.0 toolsets might even include such comparison utilities, and<br />
might even incorporate them into the recovery process for a more seamless<br />
experience when you’re just looking for a single object out of a backup.</p>
<p>&nbsp;</p>
</div>
<h2>Better Disaster Recovery</h2>
<p>There’s no doubt that Backup 2.0 can offer a better disaster recovery option than more<br />
traditional techniques. Just consider Figure 5.4, which compares the two philosophies in a<br />
practical disaster recovery timeline.</p>
<p><img src="http://www.appassure.com/wp-content/uploads/2010/ebooks_imgs/book5/Untitled-4.png" alt="" /><br />
Figure 5.4: Comparing disaster recovery techniques.</p>
<p>Backup 1.0 is on the left, where you’re spending a ton of time manually recovering software<br />
and letting SQL Server deal with its backup files. Backup 2.0 is on the right, where you’re<br />
simply pushing all the server’s disk blocks back to the server’s disk—recovering the OS,<br />
SQL Server, data files, and everything all at once, and to a specific point in time.</p>
<p>Now, I do realize that many third-party backup solutions of the Backup 1.0 variety do make<br />
backups of the entire server, and that many of them offer bootable CDs or DVDs that can<br />
kick-start a whole-server recovery. That’s great—except that it still leaves you “recovered”<br />
to an old snapshot. Making a backup of an entire server is even more time consuming than<br />
backing up a single large database; you’re less likely to have an up-to-the-minute backup,<br />
meaning more data is at risk and more time will be spent during a restore.</p>
<p>Another advantage of the Backup 2.0 technique—as I’ve pointed out in previous chapters—<br />
is that disk blocks really don’t care where they live. Disk blocks could be restored to a<br />
different server, if the original one’s hardware was irrecoverable. Disk blocks could be<br />
written to a virtual server, giving you a fantastic option for off-site recovery in the event of<br />
a data center disaster, like a flood or loss of utility power.</p>
<h2>Easier Management</h2>
<p>Management, for me, is where Backup 2.0 really has a chance to shine. Having managed the<br />
600-ish files involved in a previous company’s SQL Server backup plan, I love the way that<br />
Backup 2.0 doesn’t focus on specific point-in-time snapshots. That means no managing<br />
backup files. Instead, you manage a single backup repository, where all the backed-up disk<br />
blocks live. Rather than juggling files and tapes, you use a centralized management<br />
console—like the one shown in Figure 5.5, for example—to manage the entire repository,<br />
which might well handle backups for many, many servers. You select the server you need<br />
to restore, select the disk volume that contains the files you want to restore, and indicate<br />
the point in time you want to restore to. The repository figures out which disk blocks are<br />
involved in that recovery operation, and streams them to the server you designate.<br />
Anything from a single file to an entire server can be recovered in the same fashion.</p>
<p><img src="http://www.appassure.com/wp-content/uploads/2010/ebooks_imgs/book5/Untitled-5.png" alt="" /><br />
Figure 5.5: Examining the Backup 2.0 repository.</p>
<p>Easier management—letting the software juggle the backup data—is one of the real<br />
advantages that can be realized when we start rethinking what backups are all about.</p>
<h1>SQL Server-Specific Concerns</h1>
<p>So how will Backup 2.0 help address some of the concerns that are unique to SQL Server?<br />
Obviously, it depends on the exact Backup 2.0-style solution you’re talking about, but there<br />
are certainly ways in which solution vendors could handle SQL Server issues.</p>
<h2>Sprawl</h2>
<p>Sprawl isn’t a problem with Exchange Server or SharePoint; those applications live in the<br />
data center. SQL Server, however, spreads throughout the organization in desktop-level<br />
installations where users might not even realize that their data is contained in SQL Server.<br />
Even with client-level backup agents, this SQL Server data often goes unprotected; clientlevel<br />
agents are usually designed for simple file-and-folder backup, and don’t typically<br />
include a SQL Server-specific agent. The “hidden” SQL Server instances run continuously,<br />
just like any installation of SQL Server, thwarting simple file-and-folder backup schemes at<br />
the client level.</p>
<p>Backup 2.0 can help. Because the whole idea of Backup 2.0 is based on capturing disk<br />
blocks, it can wedge itself into the file system at a very low level, using built-in Windows<br />
hooks designed for exactly this sort of activity. Figure 5.6 illustrates where a Backup 2.0<br />
agent can work its way into the system while only adding 1 to 2% of overhead to the client<br />
system. This low level of overhead makes this type of agent perfectly suitable for<br />
workstations running “Express” or desktop instances of SQL Server.</p>
<p><img src="http://www.appassure.com/wp-content/uploads/2010/ebooks_imgs/book5/Untitled-6.png" alt="" /><br />
Figure 5.6: How backup 2.0 fits in.</p>
<p>Here’s how I envision it working: A Backup 2.0 agent, written as a file system “shim,”<br />
registers itself with the OS. When SQL Server saves data to disk—whether to a database file<br />
or to a transaction log—the shim is notified by the file system. As the file system writes the<br />
data to physical storage, the shim can read the newly-written blocks, compress them, and<br />
send them across the network to a central repository.</p>
<p>It’s far more efficient, especially for client computers, than snapshot backups. Workstations<br />
running an “Express” edition of SQL Server typically have fairly low SQL Server workloads,<br />
since SQL Server is really serving only a single application in use by one or a few users.<br />
Rather than laboriously backing up the entire system or every database file every so often,<br />
Backup 2.0 just streams the few disk blocks that have changed. In a “sprawl” environment,<br />
it’s the perfect way to create consolidated SQL Server backups—for all that important data<br />
that’s living in all your “stealth” SQL Server installations.</p>
<h2>Log Truncation</h2>
<p>If Backup 2.0 is just capturing disk blocks, when does the SQL Server transaction log get<br />
truncated? Well, in some instances you might think you could just stop using the<br />
transaction log. As Figure 5.7 shows, a SQL Server database can be configured to use a<br />
“Simple” recovery model. Unlike the “Full” model, which operates as I described earlier in<br />
this chapter, the “Simple” model basically truncates the log as soon as a transaction’s<br />
changes have been written to disk. In other words, the transaction log still exists, but it’s<br />
not a recovery option because it won’t ever contain very many transactions—it’ll only<br />
contain those transactions whose data pages are still in memory.</p>
<p><img src="http://www.appassure.com/wp-content/uploads/2010/ebooks_imgs/book5/Untitled-7.png" alt="" /><br />
Figure 5.7: Configuring a database for simple recovery model.</p>
<p>At first glance, it might seem like this would be perfect in a Backup 2.0 world. After all, you<br />
still get transaction log recovery for an unexpected server power outage, but the<br />
transaction log is self-maintaining and doesn’t need to be truncated. Your Backup 2.0<br />
solution is grabbing disk blocks almost in real time, and shipping them off to a backup<br />
repository—so what good is the transaction log?</p>
<p>In some scenarios, I’d say “go with Simple recovery!” But in others, I still like to have the<br />
piece of mind that the transaction log offers—and so I’d look for a Backup 2.0 solution that<br />
had the ability to truncate the log just as SQL Server does when it makes a successful<br />
backup. In other words, if the backup solution isn’t using native SQL Server APIs—which do<br />
truncate the log after a successful backup—then the backup solution should fully replace<br />
those APIs, including log truncation capability.</p>
<h2>Single-Object Recovery, Corruption, and Off-Location Restores</h2>
<p>Single-object recovery, corruption, and off-location restores might seem like three pretty<br />
random topics to throw together, but they’re all potential issues that are solved by the<br />
same thing. As I’ve described earlier in this chapter, single-object recovery in SQL Server<br />
pretty much always involves restoring the database to a different location, then copying<br />
objects from the restored database to the production database. That’s just inherent in the<br />
way SQL Server works. The problem is that restoring a backup, as we’ve discussed, can take<br />
a lot of time. Spending hours restoring files just to grab a single accidentally-deleted stored<br />
procedure or view is painful and unrewarding in the extreme.</p>
<p>There are many other reasons to restore a database to a different location, which is also<br />
called an offlocation<br />
restore or alternatelocation<br />
restore. One reason is to compare a<br />
backed-up database to the current, live database, using some kind of comparison tool.<br />
Another reason might be to access data that was deliberately purged from the live<br />
database. Typically, the database is restored, from backup, to a different server, or to the<br />
same server under a different database name—both of which require “scratch space,” or<br />
temporary space to hold the entire restored database for however long it is needed. Then,<br />
of course, there’s also the time to restore all the database files and let SQL Server process<br />
them.</p>
<p>My third issue is one of backup data corruption, which is an insidious thing we’ve all run<br />
into: “The backup tape is corrupted!” Although Backup 2.0 relies less (or not at all) on<br />
tapes, data corruption is still a real concern, and any decent backup solution will offer ways<br />
to detect corruption.</p>
<p>All three of these issues—off-location restores, single-object recovery, and data<br />
corruption—can be handled by a single feature we can add to our Backup 2.0 spec: I<br />
propose calling it backup mounting. Think of it like this: Our backup repository contains a<br />
bunch of disk blocks, each one time-stamped to let us know when it was captured. There’s<br />
really no reason we couldn’t select a bunch of disk blocks from a given point in time, feed<br />
them to a specialized file system driver, and “mount” them like a normal disk volume.<br />
Figure 5.8 shows what I mean.</p>
<p><img src="http://www.appassure.com/wp-content/uploads/2010/ebooks_imgs/book5/Untitled-8.png" alt="" /><br />
Figure 5.8: Mounting backedup disk blocks as a disk volume.</p>
<p>A file system drive’s job is to take some form of storage and make it look like a disk volume,<br />
files, and folders. Microsoft basically does this same thing in Windows 7, where the OS<br />
allows you to mount a virtual machine image as a disk volume. I’m simply proposing that<br />
Backup 2.0 include a special file system driver that lets Windows “see” selected portions of<br />
the backup repository as if they were a real, live, read-only disk drive.</p>
<p>Once that’s accomplished, the backup solution can make SQL Server database and log files<br />
available without performing a restore. So in zero time, your database files could “appear”—<br />
in read-only form, of course—and be attached to a live instance of SQL Server. This would<br />
enable the backup solution to conduct “attachability” tests, to determine whether the<br />
backed-up image could be operated as a full database. If it couldn’t, then corruption would<br />
be suspect. You could also attach backed-up databases on-demand for comparison<br />
purposes or for single-object recovery—without ever having to restore anything. You stay<br />
more productive, you don’t need “scratch space,” and you can “attach” a version of the<br />
database from any point in time. Truly a remarkable set of capabilities from a fairly<br />
simplistic notion—which is really what Backup 2.0 is all about: Simple, new notions that<br />
radically change the way we work, for the better.</p>
</div>
</div>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/itsolutionsinc/gXRI/~4/IJDZBDw30lg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://itsolutionsinc.net/index.php/rethinking-sql-server-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://itsolutionsinc.net/index.php/rethinking-sql-server-backups/</feedburner:origLink></item>
		<item>
		<title>Announcing eConcierge Powered by Xerox &amp; IT Solutions</title>
		<link>http://feedproxy.google.com/~r/itsolutionsinc/gXRI/~3/YZOIa7ftsx8/</link>
		<comments>http://itsolutionsinc.net/index.php/announcing-econcierge-powered-by-xerox-it-solutions/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 19:22:40 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[Business Discussions]]></category>
		<category><![CDATA[Technology Tips]]></category>
		<category><![CDATA[eConcierge]]></category>
		<category><![CDATA[Printer Supplies]]></category>

		<guid isPermaLink="false">http://itsolutionsinc.net/?p=347</guid>
		<description><![CDATA[&#160; Announcing our new, free service that automates every aspect of ordering printer supplies. Earn free service rewards We&#8217;re pleased to offer the new eConcierge Powered by Xerox service to our valued customers. Use the system continuously and you&#8217;ll earn free extended service coverage* on your eligible Xerox printers. Easy to use • Alerts you [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="15"></td>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;">
<div style="font-size: 20px; height: 20px;"></div>
<div style="font: 15pt arial, helvetica, sans-serif; color: #333333;">Announcing our new, free service that automates every aspect of ordering printer supplies.</div>
<div style="font-size: 20px; height: 20px;"></div>
<div style="font: 14pt arial, helvetica, sans-serif; color: #e24715;">Earn free service rewards</div>
<div style="font-size: 10px; height: 10px;"></div>
<p>We&#8217;re pleased to offer the new eConcierge Powered by Xerox service to our valued customers. Use the system continuously and you&#8217;ll earn free extended service coverage* on your eligible Xerox printers.</p>
<div style="font-size: 20px; height: 20px;"></div>
<div style="font: 14pt arial, helvetica, sans-serif; color: #e24715;">Easy to use</div>
<div style="font-size: 10px; height: 10px;"></div>
<table width="100%" border="0">
<tbody>
<tr>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;" align="left" valign="top" width="10">•</td>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;" align="left" valign="top">Alerts you when your networked printers are low on supplies</td>
</tr>
<tr>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;" align="left" valign="top" width="10">•</td>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;" align="left" valign="top">Identifies supplies part numbers for you</td>
</tr>
</tbody>
</table>
<div style="font-size: 20px; height: 20px;"></div>
<div style="font: 14pt arial, helvetica, sans-serif; color: #e24715;">Super convenient</div>
<div style="font-size: 10px; height: 10px;"></div>
<table width="100%" border="0">
<tbody>
<tr>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;" align="left" valign="top" width="10">•</td>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;" align="left" valign="top">Pre-populates online order info for your review and approval</td>
</tr>
<tr>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;" align="left" valign="top" width="10">•</td>
<td style="font: 11pt arial, helvetica, sans-serif; color: #666666;" align="left" valign="top">Supports Xerox, HP, Lexmark and other leading brands with competitively priced supplies</td>
</tr>
</tbody>
</table>
<div style="font-size: 20px; height: 20px;"></div>
<div style="font: 14pt arial, helvetica, sans-serif; color: #e24715;">It&#8217;s powered by Xerox, the leader in printer management solutions.</div>
<div style="font-size: 20px; height: 20px;"></div>
<div style="font: 14pt arial, helvetica, sans-serif; color: #333333;"><a style="font-weight: bold; color: #e24715 !important;" href="http://itsolutionsinc.net/index.php/solutions/managed-print-2/?svpage=econcierge" target="_blank">› Get started </a></div>
</td>
<td width="20"></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<table width="600" border="0" cellspacing="0" cellpadding="0" bgcolor="#f9f9f9">
<tbody>
<tr>
<td style="font-family: Arial, Helvetica, sans-serif; text-align: center;" height="50"><a style="font-family: arial, helvetica, sans-serif; text-decoration: none !important; font-weight: normal; font-size: 15px; color: #999999 !important;" href="http://itsolutionsinc.net/index.php/solutions/managed-print-2/?svpage=overview" target="_blank"> Xerox Showcase </a></td>
<td style="font-family: Arial, Helvetica, sans-serif; text-align: center;" height="50"><a style="font-family: arial, helvetica, sans-serif; text-decoration: none !important; font-weight: normal; font-size: 15px; color: #999999 !important;" href="http://itsolutionsinc.net/index.php/solutions/managed-print-2/?svpage=products" target="_blank">Products</a></td>
<td style="font-family: Arial, Helvetica, sans-serif; text-align: center;" height="50"><a style="font-family: arial, helvetica, sans-serif; text-decoration: none !important; font-weight: normal; font-size: 15px; color: #999999 !important;" href="http://itsolutionsinc.net/index.php/solutions/managed-print-2/?svpage=econcierge" target="_blank">eConcierge powered by Xerox</a></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/itsolutionsinc/gXRI/~4/YZOIa7ftsx8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://itsolutionsinc.net/index.php/announcing-econcierge-powered-by-xerox-it-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://itsolutionsinc.net/index.php/announcing-econcierge-powered-by-xerox-it-solutions/</feedburner:origLink></item>
		<item>
		<title>IT Support and Consulting Services for Tampa Bay Businesses</title>
		<link>http://feedproxy.google.com/~r/itsolutionsinc/gXRI/~3/vV3OUwV8_EA/</link>
		<comments>http://itsolutionsinc.net/index.php/it-support-and-consulting-services-for-tampa-bay-businesses/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 14:43:20 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[About Us]]></category>

		<guid isPermaLink="false">http://itsolutionsinc.net/?p=310</guid>
		<description><![CDATA[If you&#8217;re looking for help with your computer network, IT Solutions is your answer!]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking for help with your computer network, IT Solutions is your answer!</p>
<img src="http://feeds.feedburner.com/~r/itsolutionsinc/gXRI/~4/vV3OUwV8_EA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://itsolutionsinc.net/index.php/it-support-and-consulting-services-for-tampa-bay-businesses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://itsolutionsinc.net/index.php/it-support-and-consulting-services-for-tampa-bay-businesses/</feedburner:origLink></item>
	</channel>
</rss>

