# Broken updateSQL functionality

**URL:** <https://forum.liquibase.org/t/broken-updatesql-functionality/3804>\
**Category:** Liquibase Development\
**Created:** [January 30, 2014, 2:02pm UTC](https://forum.liquibase.org/t/broken-updatesql-functionality/3804 "2014-01-30T14:02:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guest](https://avatars.discourse-cdn.com/v4/letter/g/8dc957/32.png) [@Guest](https://forum.liquibase.org/u/Guest)\
**Post date:** [January 30, 2014, 2:02pm UTC](https://forum.liquibase.org/t/broken-updatesql-functionality/3804/1 "2014-01-30T14:02:00Z")

</div>

Generate SQL fails on 3.0.8/3.1.1 when the database is created from scratch(applying all changes on empty database).&nbsp;

It works well on 3.0.3.&nbsp;

Command : liquibase --logLevel=info &nbsp;--changeLogFile=“changelog/changelog-master.xml” updateSQL

Trace:

INFO 1/30/14 11:21 AM:liquibase: Shutting down derby connection: jdbc:derby:/home/rraj/workspace/xyz;shutdown=true

Liquibase updateSQL Failed: liquibase.exception.DatabaseException: Error executing SQL select min(locked) as test from APP.DATABASECHANGELOGLOCK fetch first row only: Table/View ‘APP.DATABASECHANGELOGLOCK’ does not exist.

SEVERE 1/30/14 11:21 AM:liquibase: liquibase.exception.DatabaseException: Error executing SQL select min(locked) as test from APP.DATABASECHANGELOGLOCK fetch first row only: Table/View ‘APP.DATABASECHANGELOGLOCK’ does not exist.

liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL select min(locked) as test from APP.DATABASECHANGELOGLOCK fetch first row only: Table/View ‘APP.DATABASECHANGELOGLOCK’ does not exist.

… 17 more

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [January 30, 2014, 2:02pm UTC](https://forum.liquibase.org/t/broken-updatesql-functionality/3804/2 "2014-01-30T14:02:00Z")

</div>

Thanks for the report. I created&nbsp;[https://liquibase.jira.com/browse/CORE-1744](https://liquibase.jira.com/browse/CORE-1744) to track the bug.

Nathan

---

<div class="post-metadata">

**Author:** ![micpage](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@micpage](https://forum.liquibase.org/u/micpage)\
**Post date:** [May 4, 2021, 12:15pm UTC](https://forum.liquibase.org/t/broken-updatesql-functionality/3804/3 "2021-05-04T12:15:59Z")

</div>

Jetzt ist wohl der Fehler wieder im Programmcode? Beim absetzen in eine leere Db2 Datenbank.

Liquibase Community 4.2.2 by Datical  
####################################################

## \_ \_ \_ \_

## | | (_) (_) |

## | | \_ \_\_ \_ \_ \_ _| |_\_ \_\_ \_ \_\_\_ \_\_\_

## | | | |/ \_` | | | | | '_ \ / _` / \_\_|/ \_ \

## | |_| | (| | || | | |_) | (_| \__ \ \_\_/

## \ __/|\_, |\_,_|_|_. **/ \__ ,_|** _/\__\_|

## | |

## |\_|

## 

## Get documentation at [docs.liquibase.com](http://docs.liquibase.com)

## Get certified courses at [learn.liquibase.com](http://learn.liquibase.com)

## Free schema change activity reports at

## xxx

## 

####################################################  
Starting Liquibase at 14:12:35 (version 4.2.2 #36 built at 2020-12-09 20:07+0000)  
Unexpected error running Liquibase: Error executing SQL SELECT MIN(locked) AS test FROM “LIQUIBASE”.DATABASECHANGELOGLOCK FETCH FIRST ROW ONLY: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=LIQUIBASE.DATABASECHANGELOGLOCK, DRIVER=4.25.23  
For more information, please use the --logLevel flag

---

<div class="post-metadata">

**Author:** ![dciancio](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@dciancio](https://forum.liquibase.org/u/dciancio)\
**Post date:** [May 5, 2021, 5:39am UTC](https://forum.liquibase.org/t/broken-updatesql-functionality/3804/4 "2021-05-05T05:39:37Z")

</div>

Looks like the same issue I just raised for → [updateSQL on DB2 trying to delete DATABASECHANGELOGLOCK](https://forum.liquibase.org/t/updatesql-on-db2-trying-to-delete-databasechangeloglock/5412)

---

<div class="post-metadata">

**Author:** ![micpage](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@micpage](https://forum.liquibase.org/u/micpage)\
**Post date:** [May 5, 2021, 6:04am UTC](https://forum.liquibase.org/t/broken-updatesql-functionality/3804/5 "2021-05-05T06:04:27Z")

</div>

Yes, this Error is the same. I hope Liquibase will fix them.
