Solved

Stored procedure with encryption in SQL server

Posted on 2013-01-23
2
497 Views
Last Modified: 2013-01-24
Hi

If I create a stored procedure with encryption then I can not see the proc's definition either by using sp_helptext or by right clicking on the proc and generate the script.

Is there any way to generate the script for encrypted stored procedure?

If the answer is no, then while we give build for testing then we need to save the proc's definition in the hard disk and if that file is deleted from the hard disk there is no way to get the definition of proc (even if the deleted file is not recovered from any software).

So the encrypted procedure needs careful handling in terms of storage. Is my understanding correct?

Please advice.

Regards
Karan Gupta
0
Comment
Question by:KaranGupta
2 Comments
 
LVL 5

Accepted Solution

by:
RehanYousaf earned 250 total points
ID: 38810251
I believe so and for confirmation you can check the following link
http://blog.sqlauthority.com/2008/11/01/sql-server-stored-procedure-with-encryption-and-execution-plan/
0
 
LVL 143

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 250 total points
ID: 38810279
>Is there any way to generate the script for encrypted stored procedure?
short answer: no. at least not from sql server directly

>and if that file is deleted from the hard disk there is no way to get the definition of proc
you may use sourcesafe + backup etc ...

now, the "long" answer.
you may be able to decrypt the stored procedures nevertheless:
http://stackoverflow.com/questions/7670636/how-to-decrypt-stored-procedure-in-sql-server-2008
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Detach & Attach method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question