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 2008 Forums
 Other SQL Server 2008 Topics
 decrypt function

Author  Topic 

4as
Starting Member

2 Posts

Posted - 2008-12-03 : 15:55:30
Hello everybody,
The following statement is working fine in 2000 and 2005

create procedure sp_Test with encryption as exec(decrypt(abcdef))

but if I run it on MS SQL 2008, I'm getting the following error:

Incorrect syntax near 'decrypt'. (Microsoft SQL Server, Error: 102)

My suggestion is that MS SQL 7 had this function(stored procedure), and 2000 and 2005 supported it, but 2008 has its own version of this function(stored procedure)

So if I'm right my question is how I can find any documentation on this decrypt() for both - MS SQL 7 and MS SQL 2008, so I will be able to do something regarding this error on MS SQL 2008. So far I was not able to find anything in Help or on the internet.

Thanks,
4as

mcrowley
Aged Yak Warrior

771 Posts

Posted - 2008-12-03 : 16:22:00
This function was actually an undocumented function in SQL 6.5. It is not a very strong encryption method, and has been entirely replaced by the Symmetric and Asymmetric key systems. I am surprised that these functions were available in SQL 2005, to be honest. I thought they had been discontinued in SQL 7.0. I think the encryption algorithm changed, which caused one development group to temporarily "lose" all of the passwords they had generated for their users.
Go to Top of Page

4as
Starting Member

2 Posts

Posted - 2008-12-03 : 17:29:32
Hi mcrowley,
thanks for the reply.

I was close, when suggested MS SQL 7 .
Now I think I uderstand the problem. Encryption has been done using MS SQL 6.5 encryption functionality and the result of this encryption is passed to decrypt(...)
Because MS SQL 2000, 2005 keep supporting this encryption algorithm (?), decrypt works fine on these servers. But for 2008 probably something new was created. So to make it work, I believe, encryption also must be done on 2008, then decript will work also.

Regards,
4as
Go to Top of Page
   

- Advertisement -