In this post I want to show you how I maintain my uninstall script for ArcSQL. You can do the same with your database based applications.

The system is simple. The arcsql_schema.sql file contains most of the objects that are created. I add a special comment called “– uninstall:” with the command to drop the object I am creating. See the image below.

The script greps those lines out and puts them into uninstall_arcsql.sql. Uninstalling my application is as easy as running the script.

Maintaining a separate uninstall file is tedious and error prone. By keeping each drop statement as close to the creation code as possible I make my life easy.

You can see the current version of the code here.

Do you like these tips?

You can support me and ArcSQL by letting people know about me. I provide consulting expertise in the automation, monitoring, and data visualization space. I am always looking for interesting projects to work on.