<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	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/"
	>

<channel>
	<title>Edwin M SarmientoSQL Server Encrypted Backups: Transparent Data Encryption or Backup Encryption &#8211; Edwin M Sarmiento</title>
	<atom:link href="https://www.edwinmsarmiento.com/sql-server-encrypted-backups-transparent-data-encryption-or-backup-encryption/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.edwinmsarmiento.com</link>
	<description>Intentional Excellence</description>
	<lastBuildDate>Mon, 13 Apr 2026 21:00:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">84283043</site>		<item>
		<title>SQL Server Encrypted Backups: Transparent Data Encryption or Backup Encryption</title>
		<link>https://www.edwinmsarmiento.com/sql-server-encrypted-backups-transparent-data-encryption-or-backup-encryption/</link>
		<comments>https://www.edwinmsarmiento.com/sql-server-encrypted-backups-transparent-data-encryption-or-backup-encryption/#comments</comments>
		<pubDate>Mon, 06 Jul 2015 02:53:25 +0000</pubDate>
		<dc:creator>Edwin M Sarmiento</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[backup encryption]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[transparent data encryption]]></category>
		<guid isPermaLink="false">http://www.edwinmsarmiento.com/?p=1756</guid>

				<description><![CDATA[This particular question came up while I was delivering a workshop last week on the new features in SQL Server 2014. Since transparent data encryption has been available since SQL Server 2008, why would I still need the backup encryption feature? For one, transparent data encryption is an Enterprise Edition-only feature whereas backup encryption exists in [&#8230;]]]></description>
					<content:encoded><![CDATA[<p>This particular question came up while I was delivering a workshop last week on the new features in SQL Server 2014. Since transparent data encryption has been available since SQL Server 2008, why would I still need the backup encryption feature?</p>
<p>For one, transparent data encryption is an Enterprise Edition-only feature whereas backup encryption exists in Standard Edition (I can stop right here and move on to the next topic of discussion.)  The price tag of an Enterprise Edition license is more than enough justification to consider using backup encryption. I&#8217;ve worked with customers in the past who had to use encryption utilities like <a href="http://truecrypt.sourceforge.net/" target="_blank">TrueCrypt</a> and <a href="https://www.gnupg.org/" target="_blank">GnuPG</a> to encrypt their backups because they do not have Enterprise Edition. When customers have Enterprise Edition, my default recommendation is to use transparent data encryption.  I wrote an <a href="http://www.mssqltips.com/sqlservertip/1507/implementing-transparent-data-encryption-in-sql-server-2008/" target="_blank">article</a> back in 2008 about how we can implement transparent data encryption to provide encryption at rest as well as for the backups we take on the databases.</p>
<h3>So, What&#8217;s The Real Difference?</h3>
<p>Both TDE and backup encryption provides encryption &#8211; the former encrypting the MDF/NDF and LDF files together with the backups taken, the latter just the backups. That also means that, whether you use TDE or backup encryption, your database backups will be encrypted. But with backup encryption, only the backups are secured. Try detaching and re-attaching the database files to a different SQL Server instance and you can easily do so. TDE does not allow you to re-attach database files unless the target SQL Server instance has the certificate used to encrypt the database files. Below is a sample workflow and script to test it out (I&#8217;m *stealing* the code from the script in the <a href="http://www.mssqltips.com/sqlservertip/1507/implementing-transparent-data-encryption-in-sql-server-2008/" target="_blank">article.</a>)</p>
<ol>
<li>Create a database master key on the master database<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: blue;">USE MASTER<br />
</span><span style="color: black;">GO<br />
</span><span style="color: blue;">CREATE MASTER KEY ENCRYPTION BY </span><span style="color: black;">PASSWORD </span><span style="color: blue;">= </span><span style="color: red;">'mY_P@$$w0rd'<br />
</span></code> </div></li>
<li>Create a certificate protected by the master key<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: blue;">CREATE </span><span style="color: black;">CERTIFICATE NorthwindCert<br />
</span><span style="color: blue;">WITH </span><span style="color: black;">SUBJECT </span><span style="color: blue;">= </span><span style="color: red;">'My DEK Certificate for Northwind database'</span></code> </div></li>
<li>Create sample databases &#8211; one that is encrypted using TDE and one that isn&#8217;t</li>
</ol>
<p>From here on, you can perform the test. We&#8217;ll use the <strong>Northwind_TDE</strong> database as the one that has TDE enabled and the <strong>Northwind_BackupEncryption</strong> as the one that does not have TDE enabled but backups will be encrypted.</p>
<div style="background-color:#eeeeee;border:1px solid #D6D6D6;font-family:arial,helvetica,sans-serif;font-size:15px;line-height:20px;margin:8px 0 20px;padding:15px 20px;"><code style="font-size: 14px;"><span style="color: green;">--Create database encryption key in the database<br />
</span><span style="color: blue;">USE </span><span style="color: black;">Northwind_TDE<br />
GO<br />
</span><span style="color: blue;">CREATE DATABASE ENCRYPTION KEY<br />
WITH </span><span style="color: black;">ALGORITHM </span><span style="color: blue;">= </span><span style="color: black;">AES_128<br />
</span><span style="color: blue;">ENCRYPTION BY </span><span style="color: black;">SERVER CERTIFICATE NorthwindCert<br />
GO</span></code></p>
<p><span style="color: green;">&#8211;Enable TDE on the database<br />
</span><span style="color: blue;">ALTER DATABASE </span><span style="color: black;">Northwind_TDE<br />
</span><span style="color: blue;">SET ENCRYPTION ON</span> </div>
<p><a href="https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample.jpg"><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-1787" src="https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample.jpg" alt="TDE_Sample" width="1175" height="631" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample.jpg 1175w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample-300x161.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample-1024x550.jpg 1024w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample-760x408.jpg 760w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample-518x278.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample-82x44.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample-600x322.jpg 600w" sizes="(max-width: 1175px) 100vw, 1175px" /></a></p>
<p><strong>NOTE:</strong> Make sure you backup the encryption key immediately after enabling TDE on your databases or encrypting your backups. And, don&#8217;t forget to update your disaster recovery strategies.</p>
<p>Now, because the <strong>Northwind_TDE</strong> database has TDE enabled, you can&#8217;t just detach and re-attach it to any SQL Server instance without first restoring the certificate on the target instance. Doing so will throw this error message.</p>
<p><a href="https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample_error_attach.jpg"><img decoding="async" class="aligncenter size-full wp-image-1788" src="https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample_error_attach.jpg" alt="TDE_Sample_error_attach" width="615" height="209" srcset="https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample_error_attach.jpg 615w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample_error_attach-300x102.jpg 300w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample_error_attach-518x176.jpg 518w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample_error_attach-82x28.jpg 82w, https://www.edwinmsarmiento.com/wp-content/uploads/2015/06/TDE_Sample_error_attach-600x204.jpg 600w" sizes="(max-width: 615px) 100vw, 615px" /></a></p>
<p>We won&#8217;t have this error message when you try to attach the <strong>Northwind_BackupEncryption</strong> database on a different SQL Server instance because it&#8217;s no different from any other user databases. Again, the only thing encrypted will be the backups, not the database. But this would give you the confidence to store your <a href="https://www.edwinmsarmiento.com/from-backup-tape-to-microsoft-azure/" target="_blank">database backups on Microsoft Azure</a> or any other cloud provider. Or, even better, when you need to transfer backups to initialize Availability Group replication, log shipping, database mirroring or replication for a remote data center. I used to rely on either <a href="http://www.winzip.com/win/en/index.htm" target="_blank">WinZip</a> or <a href="http://www.rarlab.com/" target="_blank">WinRar</a> to compress and encrypt backups to initialize log shipping and database mirroring in previous versions of SQL Server. This meant submitting a separate change request just to install these utilities on the remote SQL Server instance. Now, I have both compression and encryption built into SQL Server for this purpose.</p>
<h3>But What if I Only Have Backup Encryption?</h3>
<p>So, you only have Standard Edition and are concerned about your databases being compromised. Sure, you can encrypt your backups, but what about someone with administrative privilege and malicious intent started detaching and copying those database files? It&#8217;s the same reason I wrote <a href="https://www.edwinmsarmiento.com/regularly-treat-your-databases-to-a-s-p-a" target="_blank">this blog post</a> &#8211; I have the same concerns as you do.</p>
<p>This is where the principle of <a href="https://en.wikipedia.org/wiki/Defense_in_depth_(computing)" target="_blank">defense in-depth</a> comes in. As a SQL Server DBA, it is our responsibility to make sure that our databases are secure. We need to provide layers upon layers of protection to minimize, if not avoid these types of security breaches. Limiting access to both the host operating system and the SQL Server instance, coupled with auditing access can prevent unauthorized access.</p>
<h3>Practice Your Database Recovery Strategies</h3>
<p>The beauty of this feature is that you can restore your databases to lower editions like Web or Express Editions. Although you have a database size limitation of 10 GB for Express Editions, it still is a good opportunity to test restoring databases from encrypted backups to make sure that we still meet our recovery objectives.</p>
<h4><em>Additional Resources:</em></h4>
<ul>
<li><a href="https://msdn.microsoft.com/en-ca/library/dn449489(v=sql.120).aspx" target="_blank">SQL Server 2014 Backup Encryption</a></li>
<li><a href="https://msdn.microsoft.com/en-ca/library/bb934049.aspx" target="_blank">SQL Server Transparent Data Encryption</a></li>
<li><a href="http://www.mssqltips.com/sqlservertip/1507/implementing-transparent-data-encryption-in-sql-server-2008/" target="_blank">Implementing Transparent Data Encryption in SQL Server 2008</a> (still applies to later versions)</li>
</ul>
]]></content:encoded>
			

		<wfw:commentRss>https://www.edwinmsarmiento.com/sql-server-encrypted-backups-transparent-data-encryption-or-backup-encryption/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
				<post-id xmlns="com-wordpress:feed-additions:1">1756</post-id>	</item>
	</channel>
</rss>