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 2000 Forums
 SQL Server Administration (2000)
 Want to encrypt/obfuscate sps and udfs

Author  Topic 

mshah
Starting Member

2 Posts

Posted - 2007-01-10 : 07:10:40
i want to encrypt/obfuscate the sps and udfs of my SQL Server 2000 database. i have to send the db to 1 of our client. but i do not want him to be able to understand the sps or udfs.
is it possible? if yes then i would like to know how. and how to use those sps and udfs from in java. any changes need to be done ?
Will I have to buy any tool for this.
Please give me all the details for this.

Regards,
Manuni

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-10 : 07:27:10
Recreate the SPs and UDFs with keyword WITH ENCRYPTION
ALTER <some header here>
WITH ENCRYPTION

<old code goes here>


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

mshah
Starting Member

2 Posts

Posted - 2007-01-10 : 08:05:03
thanks Peso,
1 more question
after encryption, if need arises how do i decrypt the sp. is there any way to do it.

Regards,
Manuni
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-10 : 08:18:24
Not very easy.
With special tools it is possible to query the table where the sp is stored and retrieve the original text.

The best thing is to store a copy of all your SPs and UDFs in a text file.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-01-10 : 15:55:59
"if need arises how do i decrypt the sp. is there any way to do it."

In SQL2000 it takes seconds (refer to Google if you need to know)

I believe encryption is more robust in SQL 2005.

I recommend that all your Source Code for SProcs and UDFs is stored in a version-control system - regardless of the fact that it may also be stored in your database - and then you can refer back to any prior version.

Kristen
Go to Top of Page

swatib
Posting Yak Master

173 Posts

Posted - 2007-01-11 : 00:15:15
Thanks Kristen.........I was unaware about it.

Njoy Life
Go to Top of Page
   

- Advertisement -