Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Encrypt and decrypt

Author  Topic 

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 05:26:39
Hi guys,

I want to encrypt a stored procedure and
then i want to decrypt the same stored procedure.
Is there there anyway to do like this.?

Advance in Thanks.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-07-30 : 05:29:30
Yes.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 05:32:07
Hi peso
can you tell me,
how to do it..?
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-07-30 : 05:38:12
Yes.
Use

WITH ENCRYPTION

option when creating the stored procedure.



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 05:43:25
Hi peso,

I used
with encryption in the sp
for encrypting..

But how to decrypt the same sp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-07-30 : 05:50:42
We will not help you break an application.
You can get the information you want from Google.

Maybe when you are skilled enough and understand some of the SQL Server internals, you might be able to do this yourself.


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2008-07-30 : 06:02:20
If you write & encrypt the sproc yourself you should never need to decrypt it - just look up your script in your source control. You save versions of your scripts yah?
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 06:02:56
hi peso,

i'm trying this with google also.
But still now i cant able to get a clear solution.
so only i posted here.
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 06:04:47
Hi pootle,

If i want change any coding means..
How can i do it with a encrypted code.
so only i'm asking about the decryption.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-07-30 : 06:06:27
It took me 20 seconds to find the answer with Google.
Further 1 minute to verify the result and the decryption worked.

Why can't you?



E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2008-07-30 : 06:09:56
quote:
Originally posted by VGuyz

Hi pootle,

If i want change any coding means..
How can i do it with a encrypted code.
so only i'm asking about the decryption.

The code is encrypted on the server. But to create the sproc you wrote a script right? Best practice is to save your scripts in some sort of version control. If you don't use version control, you should as a minimum save timestamped files to the (secured) filesystem. The scripts themselves are not encrypted. The only reason you should "need" to decrypt sprocs in SQL Server is
1) You are being naughty and decrypting other peoples' work
2) You lost your scripts
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 10:29:38
Hi guys,

I have tried in many ways to encrypt a decrypted stored procedure.
Kindly do me the favor.

thanks in advance..:)
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2008-07-30 : 10:43:59
quote:
Originally posted by VGuyz

I have tried in many ways to encrypt a decrypted stored procedure.

There's only one way - WITH ENCRYPTION. Did you check BoL?
Go to Top of Page

VGuyz
Posting Yak Master

121 Posts

Posted - 2008-07-30 : 10:50:06
I have encrypted the Stored procedure by using
WITH ENCRYPTION.
But i want to know ,how to decrypt the encrypted one..?
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2008-07-30 : 11:11:35
there is no easy way to DECRYPT what has been ENCRYPTED.
Go to Top of Page

pootle_flump

1064 Posts

Posted - 2008-07-30 : 14:36:45
Actually I would call it disturbingly trivial if you have an interweb account and basic coding experience.

BTW - VGuyz - I'm afraid I won't help you. It sounds like you are decrypting something that was meant to stay encrypted.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-07-30 : 14:38:20
I'm locking this thread as we will not provide help on how to decrypt a stored procedure.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -