Solved

Stored procedure with encryption in SQL server

Posted on 2013-01-23
2
495 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 142

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

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.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now