
MICROSOFT SQL SERVER
Decrypt encrypted stored procedures
Joseph Gama & ShoeBoy 07.25.2002
Rating: -2.60- (out of 5)




|
This stored procedure will decrypt stored procedures, views or triggers that were encrypted using "with encryption". It is adapted from a script by Joseph Gama and ShoeBoy. There are two versions: one for SP's only and the other one for SP's, triggers and views. For version 1, the input is object name (stored procedure, view or trigger), and for version 2, the input is object name (stored procedure, view or trigger), object type ('T'-trigger, 'P'-stored procedure or 'V'-view). From PlanetSourceCode.com.
Reader Feedback
Joakim M. writes: I tried this script with mixed results. It works for some encrypted procedures, but for others I get error meassages like:
Karl C writes: I got the same message as Joakim M. but upon further investigation
I found that this happens only when stored procedures exceed 4000 characters.
When this happens, SQL Server stores the procedure across multiple rows so you get the
error 'subquery returne more than 1 row'. To get around that you can change the statement
That will get you the first part of the stored procedure, which can't be created bec...
To continue reading for free, register below or login
To read more you must become a member of SearchWinDevelopment.com
');
// -->

ause it is missing the end
part and is not a valid syntax but you can print @resultsp out to see it.
For More Information
- Feedback: E-mail the editor with your thoughts about this tip.
- More tips: Hundreds of free SQL Server tips and scripts.
- Tip contest: Have a SQL Server tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize -- submit your tip today!
- Best Web Links: SQL Server tips, tutorials, scripts, and more.
- Forums: Ask your technical SQL Server questions--or help out your peers by answering them--in our active forums.
- Ask the Experts: Our SQL, Database Design, Oracle, SQL Server, DB2, metadata, and data warehousing gurus are waiting to answer your toughest questions.
 |

|
|
 |
|
 |