<?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>Strate SQL &#187; Encryption</title>
	<atom:link href="http://www.jasonstrate.com/index.php/category/encryption/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonstrate.com</link>
	<description>Questions, answers, opinions and scripts from a SQL Server DBA</description>
	<lastBuildDate>Tue, 31 Aug 2010 02:56:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Restoring a Database with Symmetric Encryption</title>
		<link>http://www.jasonstrate.com/index.php/2007/10/restoring-a-database-with-symmetric-encryption/</link>
		<comments>http://www.jasonstrate.com/index.php/2007/10/restoring-a-database-with-symmetric-encryption/#comments</comments>
		<pubDate>Tue, 02 Oct 2007 23:27:00 +0000</pubDate>
		<dc:creator>jstrate</dc:creator>
				<category><![CDATA[Encryption]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL Server 2005]]></category>

		<guid isPermaLink="false">http://www.jasonstrate.com/?p=96</guid>
		<description><![CDATA[For those unfamiliar with encryption in SQL Server, this article is a nice introduction to symmetric encryption in SQL Server 2005.&#160; I&#8217;ve only used encryption a few times and it&#8217;s definitely been the godsend that the article states.&#160; 
I referenced the article recently when I had to restore a database on a new server that [...]


Related posts:<ol><li><a href='http://www.jasonstrate.com/index.php/2007/03/xml-datasources/' rel='bookmark' title='Permanent Link: XML Datasources'>XML Datasources</a></li>
<li><a href='http://www.jasonstrate.com/index.php/2008/06/database-edition-msdb-sample-database-projects/' rel='bookmark' title='Permanent Link: Database Edition msdb Sample Database Projects'>Database Edition msdb Sample Database Projects</a></li>
<li><a href='http://www.jasonstrate.com/index.php/2008/06/database-mail-failed-items-log/' rel='bookmark' title='Permanent Link: Database Mail Failed Items Log'>Database Mail Failed Items Log</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.jasonstrate.com%2Findex.php%2F2007%2F10%2Frestoring-a-database-with-symmetric-encryption%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.jasonstrate.com%2Findex.php%2F2007%2F10%2Frestoring-a-database-with-symmetric-encryption%2F" height="61" width="51" /></a></div><p>For those unfamiliar with encryption in SQL Server, <a href="http://www.sqlservercentral.com/articles/SQL+Server+2005+-+Security/sql2005symmetricencryption/2291/">this article</a> is a nice introduction to symmetric encryption in SQL Server 2005.&#160; I&#8217;ve only used encryption a few times and it&#8217;s definitely been the godsend that the article states.&#160; </p>
<p>I referenced the article recently when I had to restore a database on a new server that had data that was encrypted on the existing server.&#160; I was actually surprised in the end how easy this task was to do.</p>
<p>1. Backup the database on the [SOURCE] server.</p>
<p><strike>2. Backup the database master key on the [SOURCE] server.</strike></p>
<p><strike>BACKUP MASTER KEY TO FILE = &#8216;C:\MASTER.KEY&#8217;</strike></p>
<p><strike>ENCRYPTION BY PASSWORD = &#8216;password&#8217;</strike></p>
<p>3. Backup the service master key on the [SOURCE] server.</p>
<p>BACKUP SERVICE MASTER KEY TO FILE = &#8216;C:\SERVICE.KEY&#8217;</p>
<p>ENCRYPTION BY PASSWORD = &#8216;password&#8217;</p>
<p><strike>4. Restore the database master key on the [DESTINATION] server.</strike></p>
<p><strike>RESTORE MASTER KEY FROM FILE = &#8216;C:\MASTER.KEY&#8217;</strike></p>
<p><strike>DECRYPTION BY PASSWORD = &#8216;password&#8217;</strike></p>
<p><strike>ENCRYPTION BY PASSWORD = &#8216;password&#8217;</strike></p>
<p><strike>[ FORCE ]</strike></p>
<p>5. Restore the service master key on the [DESTINATION] server.</p>
<p>RESTORE SERVICE MASTER KEY FROM FILE = &#8216;C:\SERVICE.KEY&#8217;</p>
<p>DECRYPTION BY PASSWORD = &#8216;password&#8217;</p>
<p>[FORCE]</p>
<p>6. Restore the database on the [DESTINATION] server.</p>
<p>And viola&#8230; I was now able to decrypt the data.&#160; These steps, of course, only work if there isn&#8217;t a service master key already on the new server.&#160; And some day I&#8217;ll likely run into that situation.&#160; But I&#8217;ll blog that then&#8230;</p>
<p>EDIT:&#160; My bad, restoring the database master key is bad.&#160; Fortunately the time I had to do it there was only a single database on the test server so there was no negative impact at the time.&#160; Unfortunately, I blogged badly following that.</p>


<p>Related posts:<ol><li><a href='http://www.jasonstrate.com/index.php/2007/03/xml-datasources/' rel='bookmark' title='Permanent Link: XML Datasources'>XML Datasources</a></li>
<li><a href='http://www.jasonstrate.com/index.php/2008/06/database-edition-msdb-sample-database-projects/' rel='bookmark' title='Permanent Link: Database Edition msdb Sample Database Projects'>Database Edition msdb Sample Database Projects</a></li>
<li><a href='http://www.jasonstrate.com/index.php/2008/06/database-mail-failed-items-log/' rel='bookmark' title='Permanent Link: Database Mail Failed Items Log'>Database Mail Failed Items Log</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonstrate.com/index.php/2007/10/restoring-a-database-with-symmetric-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
