<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-333861438239736625</id><updated>2024-09-10T05:57:17.538-07:00</updated><title type='text'>ENCRYPT AND DECRYPT a STORED PROCEDURE in SQL SERVER 2008</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://encryptdecryptstoredprocedure.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/333861438239736625/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://encryptdecryptstoredprocedure.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sailaja</name><uri>http://www.blogger.com/profile/11478720535753265010</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-333861438239736625.post-379138214674508366</id><published>2012-06-10T02:32:00.001-07:00</published><updated>2012-06-10T02:41:37.400-07:00</updated><title type='text'>ENCRPT AND DECRYPT STORED PROCEDURES IN SQLSERVER 2008</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;br /&gt;
To encrypt a stored procedure in sql server 2008 , use with encryption while&lt;br /&gt;
&lt;br /&gt;
creating it.&lt;br /&gt;
if stored procedure is already created , then use it with alter statement.&lt;br /&gt;
&lt;br /&gt;
Here is an example to create an encrypted stored procedure:&lt;br /&gt;
&lt;br /&gt;
CREATE PROCEDURE SP_WITH_ENCRYPTION&lt;br /&gt;
WITH ENCRYPTION&lt;br /&gt;
AS&lt;br /&gt;
BEGIN&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SELECT &#39;HI..THIS STORED PROCEDURE IS ENCRYPTED&#39;&lt;br /&gt;
END&lt;br /&gt;
GO&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Any user , even the user with administrative privileges can not view the text&lt;br /&gt;
&lt;br /&gt;
of this procedure now. It is locked.&lt;br /&gt;
&lt;br /&gt;
To decrypt a stored procedure or any other object, we have to use third party&lt;br /&gt;
&lt;br /&gt;
tools.&lt;br /&gt;
&lt;br /&gt;
One of such third party tool is &quot;OPTILLECT&quot; SQL Decryptor tool.&lt;br /&gt;
&lt;br /&gt;
This tool can be downloaded from this url&lt;br /&gt;
&lt;a href=&quot;http://download.cnet.com/Optillect-SQL-Decryptor/3000-10254_4-75300271.html&quot;&gt;http://download.cnet.com/Optillect-SQL-Decryptor/3000-10254_4-75300271.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Using this tool, one can view the text of the encryted stored procedure or&lt;br /&gt;
&lt;br /&gt;
download/save the script of that procedure at some location on to the disc.&lt;br /&gt;
&lt;br /&gt;
This tool simply connects with the sql server and looks like sql server&lt;br /&gt;
&lt;br /&gt;
management&amp;nbsp;studio.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;one has to login with &quot; sa&quot; password (administrator account) to decrypt the&lt;br /&gt;
&lt;br /&gt;
procedures.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://encryptdecryptstoredprocedure.blogspot.com/feeds/379138214674508366/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://encryptdecryptstoredprocedure.blogspot.com/2012/06/encrpt-and-decrypt-stored-procedures-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/333861438239736625/posts/default/379138214674508366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/333861438239736625/posts/default/379138214674508366'/><link rel='alternate' type='text/html' href='http://encryptdecryptstoredprocedure.blogspot.com/2012/06/encrpt-and-decrypt-stored-procedures-in.html' title='ENCRPT AND DECRYPT STORED PROCEDURES IN SQLSERVER 2008'/><author><name>Sailaja</name><uri>http://www.blogger.com/profile/11478720535753265010</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>