# Liquibase SQL validation

**URL:** https://forum.liquibase.org/t/liquibase-sql-validation/8345
**Category:** Liquibase Development
**Created:** [June 15, 2023, 6:23pm UTC](https://forum.liquibase.org/t/liquibase-sql-validation/8345 "2023-06-15T18:23:56Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Pooja](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@Pooja](https://forum.liquibase.org/u/Pooja)
#### Post date: [June 15, 2023, 6:23pm UTC](https://forum.liquibase.org/t/liquibase-sql-validation/8345/1 "2023-06-15T18:23:56Z")

</div>

hi

I am working on liquibase automation in my team.  
I have a query if there is a way to validate if a SQL will work on a given env when executed?  
i know validate just validates the changesets. it does not actually validates the query.

---

<div class="post-metadata">

### Author: ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)
#### Post date: [June 16, 2023, 3:59pm UTC](https://forum.liquibase.org/t/liquibase-sql-validation/8345/2 "2023-06-16T15:59:26Z")

</div>

Liquibase does not validate custom SQL statements, they are passed thru to the target DBMS to validate.

---

<div class="post-metadata">

### Author: ![Pooja](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@Pooja](https://forum.liquibase.org/u/Pooja)
#### Post date: [June 16, 2023, 8:36pm UTC](https://forum.liquibase.org/t/liquibase-sql-validation/8345/3 "2023-06-16T20:36:34Z")

</div>

so there is no way for me to validate if changesets for “prod” will work on prod deployment day?

---

<div class="post-metadata">

### Author: ![daryldoak](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/daryldoak/32/764_2.png) [@daryldoak](https://forum.liquibase.org/u/daryldoak)
#### Post date: [June 19, 2023, 2:30pm UTC](https://forum.liquibase.org/t/liquibase-sql-validation/8345/4 "2023-06-19T14:30:32Z")

</div>

Liquibase has no way of knowing the state of your prod database, or whether your custom sql syntax is accurate, in order to know if your changesets will work on prod deployment day.

Liquibase does not contain a sql parser/syntax checker for every database that is supported. That is a job done much better by your actual DBMS platform.

---

<div class="post-metadata">

### Author: ![MikeOlivas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/mikeolivas/32/183_2.png) [@MikeOlivas](https://forum.liquibase.org/u/MikeOlivas)
#### Post date: [June 23, 2023, 4:37pm UTC](https://forum.liquibase.org/t/liquibase-sql-validation/8345/5 "2023-06-23T16:37:57Z")

</div>

@Pooja As @daryldoak said there is nothing in the OSS code to do this. There is a new enhancement from Liquibase Pro called pre-validation but that is paid offering. If this is important to you, we can discuss paid offering.

---

<div class="post-metadata">

### Author: ![Pooja](https://avatars.discourse-cdn.com/v4/letter/p/a5b964/32.png) [@Pooja](https://forum.liquibase.org/u/Pooja)
#### Post date: [June 27, 2023, 3:29pm UTC](https://forum.liquibase.org/t/liquibase-sql-validation/8345/6 "2023-06-27T15:29:47Z")

</div>

ok thank you. Can we arrange for a demo of how validation works with liquibase paid version?

---

<div class="post-metadata">

### Author: ![MikeOlivas](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.liquibase.org/mikeolivas/32/183_2.png) [@MikeOlivas](https://forum.liquibase.org/u/MikeOlivas)
#### Post date: [June 30, 2023, 6:40pm UTC](https://forum.liquibase.org/t/liquibase-sql-validation/8345/7 "2023-06-30T18:40:13Z")

</div>

Great, I reached out in a private message.
