Skip to main content
Question

How to delete VMart example database in vertica dockerized version

  • April 13, 2022
  • 4 replies
  • 10 views

vaishnavav99
Forum|alt.badge.img+1

I have tried to delete VMart example DB both from admin panel as well as using script
https://www.vertica.com/docs/11.1.x/HTML/Content/Authoring/GettingStartedGuide/RestoringStatusOfHost/RestoringStatusOfHost.htm
But when ever the container restarts the VMart data base respawns.
Can someone help me with this.
Thanks in Advance

4 replies

marcothesane
Forum|alt.badge.img+1
  • Participating Frequently
  • April 13, 2022

I take it that you took the docker image from the Docker hub, in that case.

That docker image always creates a Vertica database from scratch, and populates it with the tables of the VMart example.

Both the operations you describe drop the database.

With the script, you keep the docker image - with the Vertica software, but your database ceases to exist.

Either:

  • find all tables that belong to the VMart schema, for example, with the command vsql -c "\dt *.*", and drop them.

Or:

  • on the docker image without the Vertica database, run: admintools, as user dbadmin. In the appearing menu, go to Configuration Menu, there, select "Create Database", and follow the instructions there.

vaishnavav99
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • April 14, 2022

I have tried the same, I have created a new database, and stopped Vmart, started the new DB. Then deleted Vmart DB but once the container restarts, I find Vmart to be running and the new DB to be in stopped status.


vaishnavav99
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • April 19, 2022

I've been through this again, and I was able to figure out what I was missing.
The docker-entrypoint.sh by default starts VMart DB which is passed as an environment variable.
To resolve this we can either modify the environment variable or update the docker-entrypoint.sh script.


TLinde6
  • New Participant
  • November 19, 2022

Thanks for the answer @vaishnavav99