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...
>
>
Showing posts with label trigger. Show all posts
Showing posts with label trigger. Show all posts
Wednesday, March 7, 2012
Friday, February 17, 2012
Dependency based scheduling
Hi,
I am scheduling a .bat at 9.00 am to load a text file in a table A in SQL Server 2000 database. If this load is successful, I want to trigger another .bat file to execute a store proc.
Can I do this dependency based scheduling in SQL Server Scheduler and if so, can you give me details (references, books) as to how it can be done?
Thanks in advance
ShekI'd create a job with a couple of job steps. SQL server Books Online has info on sp_add_job and sp_add_jobstep. You can use XP_CMDSHELL to execute the bat files within the job steps.|||The job scheduler supports multipule tasks within one job. You can specify what action should be taken based on the success or failure of a task.
I susspect you could work through this just by setting up a test job in the job scheduler. Books Online, SQL Server Help, has a good writeup on this.
Look up "jobs" in the index. Also within jobs scan down to the sub topic of steps.
I am scheduling a .bat at 9.00 am to load a text file in a table A in SQL Server 2000 database. If this load is successful, I want to trigger another .bat file to execute a store proc.
Can I do this dependency based scheduling in SQL Server Scheduler and if so, can you give me details (references, books) as to how it can be done?
Thanks in advance
ShekI'd create a job with a couple of job steps. SQL server Books Online has info on sp_add_job and sp_add_jobstep. You can use XP_CMDSHELL to execute the bat files within the job steps.|||The job scheduler supports multipule tasks within one job. You can specify what action should be taken based on the success or failure of a task.
I susspect you could work through this just by setting up a test job in the job scheduler. Books Online, SQL Server Help, has a good writeup on this.
Look up "jobs" in the index. Also within jobs scan down to the sub topic of steps.
Subscribe to:
Posts (Atom)