<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Explanation of WITH ENCRYPTION clause for Stored Procedure and User Defined Functions</title>
	<atom:link href="http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 19:36:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Rukhsar Ahmad</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-198385</link>
		<dc:creator><![CDATA[Rukhsar Ahmad]]></dc:creator>
		<pubDate>Fri, 18 Nov 2011 07:22:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-198385</guid>
		<description><![CDATA[no need to reply..i have created my own utilities for script creation using SMO programming]]></description>
		<content:encoded><![CDATA[<p>no need to reply..i have created my own utilities for script creation using SMO programming</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rukhsar Ahmad</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-196548</link>
		<dc:creator><![CDATA[Rukhsar Ahmad]]></dc:creator>
		<pubDate>Wed, 16 Nov 2011 04:04:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-196548</guid>
		<description><![CDATA[is there any tool for sp encryption??]]></description>
		<content:encoded><![CDATA[<p>is there any tool for sp encryption??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rukhsar Ahmad</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-196545</link>
		<dc:creator><![CDATA[Rukhsar Ahmad]]></dc:creator>
		<pubDate>Wed, 16 Nov 2011 03:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-196545</guid>
		<description><![CDATA[is there any to get the SP main query part only...for example

create proc getinfo
(
@id int
)   select *from infotable where id=@id 

we can the sp parametres and data type with help of sys tables...but how i can get the sp main script part i.e. select *from infotable where id=@id only???]]></description>
		<content:encoded><![CDATA[<p>is there any to get the SP main query part only&#8230;for example</p>
<p>create proc getinfo<br />
(<br />
@id int<br />
)   select *from infotable where id=@id </p>
<p>we can the sp parametres and data type with help of sys tables&#8230;but how i can get the sp main script part i.e. select *from infotable where id=@id only???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: optillect</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-143286</link>
		<dc:creator><![CDATA[optillect]]></dc:creator>
		<pubDate>Thu, 23 Jun 2011 21:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-143286</guid>
		<description><![CDATA[@Naga, does SQL Decryptor Freeware meet your needs?]]></description>
		<content:encoded><![CDATA[<p>@Naga, does SQL Decryptor Freeware meet your needs?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naji</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-134499</link>
		<dc:creator><![CDATA[naji]]></dc:creator>
		<pubDate>Sun, 15 May 2011 18:44:04 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-134499</guid>
		<description><![CDATA[I have onlin exam how i do encrypt /decrypt database files or tables like ( question , answer . and result ...etc) please can you explenation me step by step

thanks]]></description>
		<content:encoded><![CDATA[<p>I have onlin exam how i do encrypt /decrypt database files or tables like ( question , answer . and result &#8230;etc) please can you explenation me step by step</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: naga</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-126470</link>
		<dc:creator><![CDATA[naga]]></dc:creator>
		<pubDate>Mon, 04 Apr 2011 08:20:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-126470</guid>
		<description><![CDATA[hi


i was working on SQL SERVER DBA

i faced one problem from ENCRYPTED STORED PROCEDURES 

HOW TO RETRIEVE AND HOW TO READ THE ENCRYPTED STORED PROCEDURE FROM SQL DATABASE  

  THANK U]]></description>
		<content:encoded><![CDATA[<p>hi</p>
<p>i was working on SQL SERVER DBA</p>
<p>i faced one problem from ENCRYPTED STORED PROCEDURES </p>
<p>HOW TO RETRIEVE AND HOW TO READ THE ENCRYPTED STORED PROCEDURE FROM SQL DATABASE  </p>
<p>  THANK U</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Optillect Team</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-96943</link>
		<dc:creator><![CDATA[Optillect Team]]></dc:creator>
		<pubDate>Sun, 31 Oct 2010 10:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-96943</guid>
		<description><![CDATA[Well, it&#039;s pretty easy. Run Optillect SQL Decryptor Freeware, decrypt a stored procedure you need, and copy the DDL script. Then run Microsoft SQL Server Management Studio, create new SQL editor with the same connection, paste the DDL script from the clipboard. Now remove “WITH ENCRYPTION” option, replace &quot;CREATE&quot; keyword with &quot;ALTER&quot; and execute the script. Thus you&#039;ll get your stored procedure stored with no ecryption.
  Unfortunately, SQL Decryptor v1.1 cannot do it automatically at the moment, but we are planning to support this feature in the next release.]]></description>
		<content:encoded><![CDATA[<p>Well, it&#8217;s pretty easy. Run Optillect SQL Decryptor Freeware, decrypt a stored procedure you need, and copy the DDL script. Then run Microsoft SQL Server Management Studio, create new SQL editor with the same connection, paste the DDL script from the clipboard. Now remove “WITH ENCRYPTION” option, replace &#8220;CREATE&#8221; keyword with &#8220;ALTER&#8221; and execute the script. Thus you&#8217;ll get your stored procedure stored with no ecryption.<br />
  Unfortunately, SQL Decryptor v1.1 cannot do it automatically at the moment, but we are planning to support this feature in the next release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Narendra Thakur, Karsog, Himachal Pradesh</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-95208</link>
		<dc:creator><![CDATA[Narendra Thakur, Karsog, Himachal Pradesh]]></dc:creator>
		<pubDate>Sat, 23 Oct 2010 07:08:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-95208</guid>
		<description><![CDATA[Dear Sir,

I have my StoredProcedure encrypted using &quot;WITH ENCRYPTION&quot;. 
Now how can I make changes in this stored procedure.

Reply Soon!!!

Regards,

NarendraThakur]]></description>
		<content:encoded><![CDATA[<p>Dear Sir,</p>
<p>I have my StoredProcedure encrypted using &#8220;WITH ENCRYPTION&#8221;.<br />
Now how can I make changes in this stored procedure.</p>
<p>Reply Soon!!!</p>
<p>Regards,</p>
<p>NarendraThakur</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Optillect Team</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-87621</link>
		<dc:creator><![CDATA[Optillect Team]]></dc:creator>
		<pubDate>Sun, 12 Sep 2010 21:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-87621</guid>
		<description><![CDATA[Hello guys,
We strongly recommend NOT to use WITH ENCRYPTION option, because as easy to encrypt, as easy to decrypt. Unfortunatelly, SQL Server uses database&#039;s GUID and object&#039;s ID as a key for deprecated RC4, and then simple byte-wise XOR. We hope Microsoft SQL Server&#039;s team will eliminate this flaw or just desist support this option. As a solution we provide our FREEWARE named SQL Decryptor. Check it out on our web-site.]]></description>
		<content:encoded><![CDATA[<p>Hello guys,<br />
We strongly recommend NOT to use WITH ENCRYPTION option, because as easy to encrypt, as easy to decrypt. Unfortunatelly, SQL Server uses database&#8217;s GUID and object&#8217;s ID as a key for deprecated RC4, and then simple byte-wise XOR. We hope Microsoft SQL Server&#8217;s team will eliminate this flaw or just desist support this option. As a solution we provide our FREEWARE named SQL Decryptor. Check it out on our web-site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hingman</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-85184</link>
		<dc:creator><![CDATA[hingman]]></dc:creator>
		<pubDate>Wed, 25 Aug 2010 06:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-85184</guid>
		<description><![CDATA[I recently encountered the same problem.
Finally, I was using AzSQL Decryptor to view.

Good luck.]]></description>
		<content:encoded><![CDATA[<p>I recently encountered the same problem.<br />
Finally, I was using AzSQL Decryptor to view.</p>
<p>Good luck.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: deepak Kumar</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-83219</link>
		<dc:creator><![CDATA[deepak Kumar]]></dc:creator>
		<pubDate>Fri, 06 Aug 2010 06:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-83219</guid>
		<description><![CDATA[how can i decrypt view in sql server 2008]]></description>
		<content:encoded><![CDATA[<p>how can i decrypt view in sql server 2008</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kelkar</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-66858</link>
		<dc:creator><![CDATA[Kelkar]]></dc:creator>
		<pubDate>Mon, 26 Apr 2010 10:24:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-66858</guid>
		<description><![CDATA[Hi Pinal Dave,
I understand the risk of Encrypting the sp&#039;s, but As i am experiencing the security risk of my database as it can be easily copied to other system and get attached to another instance, I feel need of encryption. Even creating the user won&#039;t help in these conditions.
Though i am new to MS SQL, I strongly fee that MS should incorporate the user specific database files for strong security of the database.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal Dave,<br />
I understand the risk of Encrypting the sp&#8217;s, but As i am experiencing the security risk of my database as it can be easily copied to other system and get attached to another instance, I feel need of encryption. Even creating the user won&#8217;t help in these conditions.<br />
Though i am new to MS SQL, I strongly fee that MS should incorporate the user specific database files for strong security of the database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vishal Ahir</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-62603</link>
		<dc:creator><![CDATA[Vishal Ahir]]></dc:creator>
		<pubDate>Wed, 10 Mar 2010 09:37:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-62603</guid>
		<description><![CDATA[Hi Pinal Dave,
If i create one encrypted SP then please tale me how to give permission to selected login user like sa or other user which i created]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal Dave,<br />
If i create one encrypted SP then please tale me how to give permission to selected login user like sa or other user which i created</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bab</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-60012</link>
		<dc:creator><![CDATA[Bab]]></dc:creator>
		<pubDate>Thu, 21 Jan 2010 04:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-60012</guid>
		<description><![CDATA[Hi Pinal,

Only privileged users who can access system tables over the DAC port or directly access database files as well as can attach a debugger to the server process can retrieve the decrypted procedure from memory at runtime.

Is that mean administrator can view the decrypted procedure? Is there any way to hide or prevent from retrieving the decryted script from the administrator?

I also read on some articles that there are some softwares to decrypt the encrypted SQL scripts. Can we prevent such softwares from decrypting the encrypted SQL scripts?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>Only privileged users who can access system tables over the DAC port or directly access database files as well as can attach a debugger to the server process can retrieve the decrypted procedure from memory at runtime.</p>
<p>Is that mean administrator can view the decrypted procedure? Is there any way to hide or prevent from retrieving the decryted script from the administrator?</p>
<p>I also read on some articles that there are some softwares to decrypt the encrypted SQL scripts. Can we prevent such softwares from decrypting the encrypted SQL scripts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bhavesh</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-59698</link>
		<dc:creator><![CDATA[Bhavesh]]></dc:creator>
		<pubDate>Wed, 13 Jan 2010 13:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-59698</guid>
		<description><![CDATA[Hi,
How do we encrypt multiple stored procedures in one go? (Surely, keeping source copy in another database )]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
How do we encrypt multiple stored procedures in one go? (Surely, keeping source copy in another database )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-59447</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 18:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-59447</guid>
		<description><![CDATA[Hello Krishna,

In user database set the user&#039;s property to remove the View Definition permision on selected or all stored procedures. You can also remove the Execute permission on stored procedures. For this go to database &gt; Security &gt; Users &gt; right click a user &gt; Properties &gt; Securables &gt; here add object and set the permissions on that object.

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hello Krishna,</p>
<p>In user database set the user&#8217;s property to remove the View Definition permision on selected or all stored procedures. You can also remove the Execute permission on stored procedures. For this go to database &gt; Security &gt; Users &gt; right click a user &gt; Properties &gt; Securables &gt; here add object and set the permissions on that object.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: krishna</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-59425</link>
		<dc:creator><![CDATA[krishna]]></dc:creator>
		<pubDate>Thu, 07 Jan 2010 08:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-59425</guid>
		<description><![CDATA[please tel me how to hide the created storde procedurs from user]]></description>
		<content:encoded><![CDATA[<p>please tel me how to hide the created storde procedurs from user</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Devarajan</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-58190</link>
		<dc:creator><![CDATA[Devarajan]]></dc:creator>
		<pubDate>Fri, 04 Dec 2009 10:31:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-58190</guid>
		<description><![CDATA[Hi Giri,

Did you get any solution for encrypting table structures (not table data)? Please forward me here.

Thanks in Advance.]]></description>
		<content:encoded><![CDATA[<p>Hi Giri,</p>
<p>Did you get any solution for encrypting table structures (not table data)? Please forward me here.</p>
<p>Thanks in Advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giri</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-55892</link>
		<dc:creator><![CDATA[Giri]]></dc:creator>
		<pubDate>Tue, 15 Sep 2009 16:44:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-55892</guid>
		<description><![CDATA[how to protect table from viewing its data and columns in sql server 2005, we can encrypt SP&#039;s and UDF, what abt table, i read an article on this but its for data encryption in table, but i want to encrypt table columns itself, i want to restrict the user from seeing its design]]></description>
		<content:encoded><![CDATA[<p>how to protect table from viewing its data and columns in sql server 2005, we can encrypt SP&#8217;s and UDF, what abt table, i read an article on this but its for data encryption in table, but i want to encrypt table columns itself, i want to restrict the user from seeing its design</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elahi_Mohsen</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-47299</link>
		<dc:creator><![CDATA[Elahi_Mohsen]]></dc:creator>
		<pubDate>Tue, 24 Feb 2009 22:27:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-47299</guid>
		<description><![CDATA[Hai
can anyone tell me how to create a stored procedure with an encryption and password to decrypt it back again when ever requrired.]]></description>
		<content:encoded><![CDATA[<p>Hai<br />
can anyone tell me how to create a stored procedure with an encryption and password to decrypt it back again when ever requrired.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chaitu</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-44459</link>
		<dc:creator><![CDATA[chaitu]]></dc:creator>
		<pubDate>Mon, 01 Dec 2008 07:15:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-44459</guid>
		<description><![CDATA[Hai 
          can anyone tell me how to create a stored procedure with an encryption and password to decrypt it back again when ever requrired.]]></description>
		<content:encoded><![CDATA[<p>Hai<br />
          can anyone tell me how to create a stored procedure with an encryption and password to decrypt it back again when ever requrired.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-43244</link>
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Thu, 25 Sep 2008 11:55:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-43244</guid>
		<description><![CDATA[Hi Vinay,

Yes, Use the code provided above (copyright prevents redistribution so you&#039;ll need to sign up and download the code yourself):

http://education.sqlfarms.com/education/ShowPost.aspx?PostID=783.

and wrap this up in a cursor or loop.  You can even call this using xp_cmdshell &#039;SQLCMD...&#039; via a batch file if you wanted to pass in other params (multiple db&#039;s, server\instance, etc). 

All the best,

Matt.]]></description>
		<content:encoded><![CDATA[<p>Hi Vinay,</p>
<p>Yes, Use the code provided above (copyright prevents redistribution so you&#8217;ll need to sign up and download the code yourself):</p>
<p><a href="http://education.sqlfarms.com/education/ShowPost.aspx?PostID=783" rel="nofollow">http://education.sqlfarms.com/education/ShowPost.aspx?PostID=783</a>.</p>
<p>and wrap this up in a cursor or loop.  You can even call this using xp_cmdshell &#8216;SQLCMD&#8230;&#8217; via a batch file if you wanted to pass in other params (multiple db&#8217;s, server\instance, etc). </p>
<p>All the best,</p>
<p>Matt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vinay</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-42766</link>
		<dc:creator><![CDATA[vinay]]></dc:creator>
		<pubDate>Sat, 13 Sep 2008 15:03:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-42766</guid>
		<description><![CDATA[Hi,

Is there anyway of encrypting more than 10 stored procedures at a time?????


Please suggest.......

Thanks in Advance]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Is there anyway of encrypting more than 10 stored procedures at a time?????</p>
<p>Please suggest&#8230;&#8230;.</p>
<p>Thanks in Advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhilash</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-41436</link>
		<dc:creator><![CDATA[Abhilash]]></dc:creator>
		<pubDate>Thu, 07 Aug 2008 10:28:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-41436</guid>
		<description><![CDATA[Hello,

There is a tool which can decrypt the encrypted stored procedure. Is there any way with which we can restrict decryption of stored procedures? In my situation the database would be in the client side and I would like to enrypt the Stored procedure. Please help.

Thanks,
Abhilash]]></description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>There is a tool which can decrypt the encrypted stored procedure. Is there any way with which we can restrict decryption of stored procedures? In my situation the database would be in the client side and I would like to enrypt the Stored procedure. Please help.</p>
<p>Thanks,<br />
Abhilash</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Dimmick</title>
		<link>http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-38868</link>
		<dc:creator><![CDATA[Mike Dimmick]]></dc:creator>
		<pubDate>Thu, 29 May 2008 12:55:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/07/01/sql-server-explanation-of-with-encryption-clause-for-stored-procedure-and-user-defined-functions/#comment-38868</guid>
		<description><![CDATA[In fact, due to a flaw in how SQL Server encrypts an altered procedure, decrypting the original procedure text is easy.

SQL Server uses the RC4 cipher algorithm to encrypt the procedure text. This algorithm generates a stream of key data (called the keystream) from a starting key, then encrypts the plaintext by using the XOR operation. The beauty of the XOR operation is that to reverse it, you simply XOR the ciphertext with the keystream.

Unfortunately, when you use ALTER PROCEDURE, SQL Server encrypts the new text using the same key as it did when encrypting the original text. This means it uses the same keystream. To recover the keystream when you know the ciphertext and the plaintext, you can simply XOR the ciphertext and plaintext together. You can then recover the original plaintext by XORing the recovered keystream with the original ciphertext.

You can find copies of scripts that do this in numerous places, for example at http://education.sqlfarms.com/education/ShowPost.aspx?PostID=783.

I&#039;m not sure how SQL Server decides what the encryption key should be - it may be as simple as deriving a key from the procedure&#039;s objectid.

SQL Server 2005&#039;s documentation describes the result as &#039;obfuscated text&#039; rather than &#039;encrypted&#039;.]]></description>
		<content:encoded><![CDATA[<p>In fact, due to a flaw in how SQL Server encrypts an altered procedure, decrypting the original procedure text is easy.</p>
<p>SQL Server uses the RC4 cipher algorithm to encrypt the procedure text. This algorithm generates a stream of key data (called the keystream) from a starting key, then encrypts the plaintext by using the XOR operation. The beauty of the XOR operation is that to reverse it, you simply XOR the ciphertext with the keystream.</p>
<p>Unfortunately, when you use ALTER PROCEDURE, SQL Server encrypts the new text using the same key as it did when encrypting the original text. This means it uses the same keystream. To recover the keystream when you know the ciphertext and the plaintext, you can simply XOR the ciphertext and plaintext together. You can then recover the original plaintext by XORing the recovered keystream with the original ciphertext.</p>
<p>You can find copies of scripts that do this in numerous places, for example at <a href="http://education.sqlfarms.com/education/ShowPost.aspx?PostID=783" rel="nofollow">http://education.sqlfarms.com/education/ShowPost.aspx?PostID=783</a>.</p>
<p>I&#8217;m not sure how SQL Server decides what the encryption key should be &#8211; it may be as simple as deriving a key from the procedure&#8217;s objectid.</p>
<p>SQL Server 2005&#8242;s documentation describes the result as &#8216;obfuscated text&#8217; rather than &#8216;encrypted&#8217;.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

