# How to use tagDatabase properly

**URL:** <https://forum.liquibase.org/t/how-to-use-tagdatabase-properly/966>\
**Category:** General Discussion\
**Created:** [December 3, 2010, 7:08am UTC](https://forum.liquibase.org/t/how-to-use-tagdatabase-properly/966 "2010-12-03T07:08:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![donkeyx](https://avatars.discourse-cdn.com/v4/letter/d/e274bd/32.png) [@donkeyx](https://forum.liquibase.org/u/donkeyx)\
**Post date:** [December 3, 2010, 7:08am UTC](https://forum.liquibase.org/t/how-to-use-tagdatabase-properly/966/1 "2010-12-03T07:08:00Z")

</div>

Hey Guys,

I am new to liquibase and trying to use the tag database feature but having trouble. Basically i am starting midway through a project and it seems to be working ok. I have generated the changelog and done the changelogSyncSQL to identify the queries that will be run on the boxes to setup. However at this point i would like to tag the db with the release version of the app at it starting state in this example which is 0.5.3. So where I am at now is that i have tried to add the tagDatabase to the existing changesets and rerun the syncSQL. However it fails in this case with :

Migration Failed: cvc-complex-type.2.4.a: Invalid content was found starting with element 'createSequence'. One of '{"[http://www.liquibase.org/xml/ns/dbchangelog/1.9":modifySql](http://www.liquibase.org/xml/ns/dbchangelog/1.9%22:modifySql)}' is expected.

For this changeset:

&nbsp; &nbsp; &nbsp; &nbsp;

So as an alternative i just tried creting a new changeset for the tag with :

&nbsp; &nbsp; &nbsp; &nbsp; 

In this case it does not tag the database but just creates a new changes set called tagging database :

INSERT INTO DATABASECHANGELOG (DATEEXECUTED, AUTHOR, LIQUIBASE, DESCRIPTION, COMMENTS, MD5SUM, ID, FILENAME) VALUES (SYSDATE, 'me (generated)', '1.9.5', 'Tag Database', '', 'b818a9dd1aa95b53f7e433a4445ad0', '1291354233716-24', './grails-app/migrations/changelog.xml');

And does not actually apply a tag to the database. So at this stage I am a bit stumped as to the problem. Am i misunderstanding the use of the tag in this case? Do i have to run the tag apply directly to the database including prod “i would not be allowed to do this by the dba’s”? I really have no idea and the doco just says \<tagDatabase=“blah”/\> which is not particularly helpful 😉 .

Any help would be appreciated because I would really like to get this setup properly the first time and not have to hack it later. It might also be a good business case for us to use it if i get a good process setup.

Cheers Dave

---

<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:** [December 3, 2010, 7:08am UTC](https://forum.liquibase.org/t/how-to-use-tagdatabase-properly/966/2 "2010-12-03T07:08:00Z")

</div>

(sorry for the slow reply)

Are you trying to run the tag changeSet with syncSQL?&nbsp; It won’t actully tag it unless you run “update”.&nbsp; Otherwise, changeLogSync is just to mark changeSets as ran without actually running htem.

There is also a tag command you can use from the command line as well.&nbsp; So you could run liquibase tag version\_0.5.3

Nathan
