Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Stored procedure with encryption in SQL server

Posted on 2013-01-23
2
Medium Priority
?
506 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 1000 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 1000 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

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

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

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…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

971 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