Monday, March 26, 2012

Encryption Example

I am running through a great 2005 Encryption example at the following link:
http://blogs.msdn.com/lcris/archive/2005/12/16/504692.aspx
I keep running into one problem though. When I execute the following at
this link
"open symmetric key Doc2Key DECRYPTION BY certificate Doc2cert"
I get the following error
"Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'BY'."
Anybody have any idea what is going on?Below code (taken from Books Online) gives me a "proper" error message:
OPEN SYMMETRIC KEY SymKeyMarketing3
DECRYPTION BY CERTIFICATE MarketingCert9;
Server: Msg 15151, Level 16, State 1, Line 1
Cannot find the symmetric key 'SymKeyMarketing3', because it does not exist or you do not have
permission.
Perhaps the compatibility level for your database is lower than 90?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"CLM" <CLM@.discussions.microsoft.com> wrote in message
news:382B3A15-06A0-4C0B-A962-047D67FC8EDA@.microsoft.com...
>I am running through a great 2005 Encryption example at the following link:
> http://blogs.msdn.com/lcris/archive/2005/12/16/504692.aspx
> I keep running into one problem though. When I execute the following at
> this link
> "open symmetric key Doc2Key DECRYPTION BY certificate Doc2cert"
> I get the following error
> "Msg 156, Level 15, State 1, Line 2
> Incorrect syntax near the keyword 'BY'."
> Anybody have any idea what is going on?
>
>|||Thx for the idea, but it is 90.
"Tibor Karaszi" wrote:
> Below code (taken from Books Online) gives me a "proper" error message:
> OPEN SYMMETRIC KEY SymKeyMarketing3
> DECRYPTION BY CERTIFICATE MarketingCert9;
> Server: Msg 15151, Level 16, State 1, Line 1
> Cannot find the symmetric key 'SymKeyMarketing3', because it does not exist or you do not have
> permission.
> Perhaps the compatibility level for your database is lower than 90?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "CLM" <CLM@.discussions.microsoft.com> wrote in message
> news:382B3A15-06A0-4C0B-A962-047D67FC8EDA@.microsoft.com...
> >I am running through a great 2005 Encryption example at the following link:
> > http://blogs.msdn.com/lcris/archive/2005/12/16/504692.aspx
> > I keep running into one problem though. When I execute the following at
> > this link
> > "open symmetric key Doc2Key DECRYPTION BY certificate Doc2cert"
> > I get the following error
> > "Msg 156, Level 15, State 1, Line 2
> > Incorrect syntax near the keyword 'BY'."
> > Anybody have any idea what is going on?
> >
> >
> >
>|||Are you running the release version of SQL Server 2005? This syntax was
different in some of the CTP versions.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"CLM" <CLM@.discussions.microsoft.com> wrote in message
news:382B3A15-06A0-4C0B-A962-047D67FC8EDA@.microsoft.com...
>I am running through a great 2005 Encryption example at the following link:
> http://blogs.msdn.com/lcris/archive/2005/12/16/504692.aspx
> I keep running into one problem though. When I execute the following at
> this link
> "open symmetric key Doc2Key DECRYPTION BY certificate Doc2cert"
> I get the following error
> "Msg 156, Level 15, State 1, Line 2
> Incorrect syntax near the keyword 'BY'."
> Anybody have any idea what is going on?
>
>|||No. I had just thought of that and noticed that I was on Beta 2. We've got
an MSDN subscription, so I'll get the latest and greatest. Thx.
"Roger Wolter[MSFT]" wrote:
> Are you running the release version of SQL Server 2005? This syntax was
> different in some of the CTP versions.
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "CLM" <CLM@.discussions.microsoft.com> wrote in message
> news:382B3A15-06A0-4C0B-A962-047D67FC8EDA@.microsoft.com...
> >I am running through a great 2005 Encryption example at the following link:
> > http://blogs.msdn.com/lcris/archive/2005/12/16/504692.aspx
> > I keep running into one problem though. When I execute the following at
> > this link
> > "open symmetric key Doc2Key DECRYPTION BY certificate Doc2cert"
> > I get the following error
> > "Msg 156, Level 15, State 1, Line 2
> > Incorrect syntax near the keyword 'BY'."
> > Anybody have any idea what is going on?
> >
> >
> >
>
>

No comments:

Post a Comment