Wednesday, March 7, 2012

Deploying a managed code trigger

I am working on a managed code trigger using visual studio 2005 and SQL 2005
.
When I try to deploy it I get the following error:
Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility
level of the current database to a higher value to enable this feature. See
help for the stored procedure sp_dbcmptlevel.
I have set the assembly permission level to safe.
The database I am using is one I restored from SQL 2000 into SQL 2005. I
tried setting the datbase compatibility level to 8, and then to 7, and still
get the same error. Any ideas?
Ron Coffee, MCSD> The database I am using is one I restored from SQL 2000 into SQL 2005. I
> tried setting the datbase compatibility level to 8, and then to 7, and
> still
> get the same error. Any ideas?
CLR triggers were introduced in SQL 2005. Have you tried setting the
database compatibility level to 90 (SQL 2005)?
Hope this helps.
Dan Guzman
SQL Server MVP
"Ron_Coffee" <Ron_Coffee@.discussions.microsoft.com> wrote in message
news:181E0D5F-D699-477C-B266-31D2AE5B464E@.microsoft.com...
>I am working on a managed code trigger using visual studio 2005 and SQL
>2005.
> When I try to deploy it I get the following error:
> Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility
> level of the current database to a higher value to enable this feature.
> See
> help for the stored procedure sp_dbcmptlevel.
>
> I have set the assembly permission level to safe.
> The database I am using is one I restored from SQL 2000 into SQL 2005. I
> tried setting the datbase compatibility level to 8, and then to 7, and
> still
> get the same error. Any ideas?
> --
> Ron Coffee, MCSD|||You'll need compatibility level 9 -- SQL 2005 is version 9.0
"Ron_Coffee" wrote:

> I am working on a managed code trigger using visual studio 2005 and SQL 20
05.
> When I try to deploy it I get the following error:
> Incorrect syntax near 'EXTERNAL'. You may need to set the compatibility
> level of the current database to a higher value to enable this feature. Se
e
> help for the stored procedure sp_dbcmptlevel.
>
> I have set the assembly permission level to safe.
> The database I am using is one I restored from SQL 2000 into SQL 2005. I
> tried setting the datbase compatibility level to 8, and then to 7, and sti
ll
> get the same error. Any ideas?
> --
> Ron Coffee, MCSD|||Thanks! That solved it
--
Ron Coffee, MCSD
"Dan Guzman" wrote:

> CLR triggers were introduced in SQL 2005. Have you tried setting the
> database compatibility level to 90 (SQL 2005)?
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Ron_Coffee" <Ron_Coffee@.discussions.microsoft.com> wrote in message
> news:181E0D5F-D699-477C-B266-31D2AE5B464E@.microsoft.com...
>
>

No comments:

Post a Comment