# Exception running dropAllDatabaseObject task on SQLServer

**URL:** <https://forum.liquibase.org/t/exception-running-dropalldatabaseobject-task-on-sqlserver/845>\
**Category:** General Discussion\
**Created:** [October 6, 2010, 3:02pm UTC](https://forum.liquibase.org/t/exception-running-dropalldatabaseobject-task-on-sqlserver/845 "2010-10-06T15:02:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dean.m.jones](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@dean.m.jones](https://forum.liquibase.org/u/dean.m.jones)\
**Post date:** [October 6, 2010, 3:02pm UTC](https://forum.liquibase.org/t/exception-running-dropalldatabaseobject-task-on-sqlserver/845/1 "2010-10-06T15:02:00Z")

</div>

Hello folks,

I’m having a problem with the head of trunk when calling the dropAllDatabaseObject ant task on a SQLServer db (this worked previously, the only change was to update liquibase from revision 1719 to 1776). I now get the following error when running dropAllDatabaseObject (full stacktrace attached):

BUILD FAILED  
liquibase.exception.DatabaseException: Error getting jdbc:jtds:sqlserver://myserver/mydatabase view with liquibase.statement.core.GetViewDefinitionStatement@13f210f  
&nbsp; &nbsp; &nbsp; &nbsp; at liquibase.snapshot.jvm.JdbcDatabaseSnapshotGenerator.readView(JdbcDatabaseSnapshotGenerator.java:147)

Looking back through the recent commits on liquibase, commit 1764 ([http://liquibase.jira.com/source/changelog/CORE/?cs=1764](http://liquibase.jira.com/source/changelog/CORE/?cs=1764)) seemed to be the most relevant so I backed-off to revision 1763 and the exception no longer occurs. The error is caused by liquibase trying to run the following sql:

select object\_definition(object\_id) from sys.objects where type=‘v’ and upper(name)=‘CASEENTITIES’ and schema\_id=‘dbo’

Clearly, “dbo” is not a valid value for the schema\_id.

Best wishes,

Dean.

---

<div class="post-metadata">

**Author:** ![dean.m.jones](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@dean.m.jones](https://forum.liquibase.org/u/dean.m.jones)\
**Post date:** [October 6, 2010, 3:02pm UTC](https://forum.liquibase.org/t/exception-running-dropalldatabaseobject-task-on-sqlserver/845/2 "2010-10-06T15:02:00Z")

</div>

Please ignore the comments related to revision 1764; I’ve just realised it can’t be that as it was committed to the 1.9 branch. I’ll continue checking and see if I can work out what revision introduced the error.

---

<div class="post-metadata">

**Author:** ![dean.m.jones](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@dean.m.jones](https://forum.liquibase.org/u/dean.m.jones)\
**Post date:** [October 6, 2010, 3:02pm UTC](https://forum.liquibase.org/t/exception-running-dropalldatabaseobject-task-on-sqlserver/845/3 "2010-10-06T15:02:00Z")

</div>

Have now located the problematic revision - it’s 1733 ([http://liquibase.jira.com/source/changelog/CORE/?cs=1733](http://liquibase.jira.com/source/changelog/CORE/?cs=1733))

---

<div class="post-metadata">

**Author:** ![dean.m.jones](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@dean.m.jones](https://forum.liquibase.org/u/dean.m.jones)\
**Post date:** [October 6, 2010, 3:02pm UTC](https://forum.liquibase.org/t/exception-running-dropalldatabaseobject-task-on-sqlserver/845/4 "2010-10-06T15:02:00Z")

</div>

I’ve raised a JIRA issue ([http://liquibase.jira.com/browse/CORE-750](http://liquibase.jira.com/browse/CORE-750)) for this.
