# Kicking off a Continua process on changes to a SQL Server Schema

**URL:** <https://www.finalbuilder.com/forums/t/kicking-off-a-continua-process-on-changes-to-a-sql-server-schema/6495>\
**Category:** Discussion\
**Tags:** continua-ci\
**Created:** [May 21, 2019, 1:54pm UTC](https://www.finalbuilder.com/forums/t/kicking-off-a-continua-process-on-changes-to-a-sql-server-schema/6495 "2019-05-21T13:54:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)\
**Post date:** [May 22, 2019, 12:32pm UTC](https://www.finalbuilder.com/forums/t/kicking-off-a-continua-process-on-changes-to-a-sql-server-schema/6495/3 "2019-05-22T12:32:31Z")

</div>

Hi Lars,

We don’t have any triggers which detect SQL schema changes, although this would be a nice feature to have in the future.

As you have noted, you could use a Periodic Trigger to frequently start a build containing actions to download the SQL Schema. The actions could include the new [SQL Package Extract action](https://wiki.finalbuilder.com/display/continua/SQL+Package+Extract+Action), or if you have FinalBuilder (and Redgate SQL Compare), you can use the Redgate SQL Compare - Make Scripts action, or use [PowerShell](https://devblogs.microsoft.com/scripting/use-powershell-to-script-sql-database-objects/).

To detect whether the schema has changed, you could use the FinalBuilder File Compare action to compare with a previous version of the schema (stored on a shared folder). Then use Flow Control actions to decide whether to stop the build, continue the build, or trigger a new build via a Build Completed Trigger.

You could also commit the schema files to a version control repository using FinalBuilder actions or the via a Run Dos Command / Batch File action. If there are changes then a new changset will be created and this can be used to trigger another build via a Repository and Repository Trigger.

Another possibility would be to set up a [DDL trigger in SQL Server](https://www.sqlteam.com/articles/using-ddl-triggers-in-sql-server-2005-to-capture-schema-changes) which writes to file when the schema changes. The file could be picked up by a File Repository and used to trigger a build via a Repository Trigger.

---

_[View the full topic](https://www.finalbuilder.com/forums/t/kicking-off-a-continua-process-on-changes-to-a-sql-server-schema/6495)._
