I recently had an error running Database Designer which left some residual tables and schemas associated with the design. I posted my question on the (unofficial) Vertica forums as to how to remove the design workspace, and was fortunate to have my question answered. However, I was surprised there were few resources around the function suggested in the answer.
The error that I received from Database Designer was:
Unknown error while running Database Designer.
Design process may still be executing in the background.
After attempting to retry the design, the error I received was:
The design cannot be created because another design ‘design’ is in progress. Try again when that session is complete.
After my question was answered, I was expecting to be able to research the answer for my own reference. In this case, there was little documentation around resolving Database Designer errors using the two functions described below. At the time of this post, a Google search for “dbd_drop_all_workspaces” returns 7 results. The only official resource being a Vertica 5.0 Troubleshooting Guide on an IBM FTP. It almost seems as though Vertica expects there to be no need to use these cleanup functions in Vertica versions newer than 5.0. I strongly feel these should be part of the core documentation.
Onto the valuable information from the 5.0 troubleshooting guide:
In rare circumstances, a user design space (workspace) might not be dropped, such as if the terminal window closes mid design. The following issues describe the different error messages you might see and how to resolve them.
A workspace is left behind after the design process stopped running, such as if the terminal window closes. When you next start the Administration Tools and try to recreate the design, the system returns a message that multiple workspaces are not allowed.
12 Error creating design <design name>: Multiple workspaces are not allowed. Design workspace ("<workspace name>") exists.HINT: Drop existing workspace and try again
- Drop the Database Designer workspace tables manually using the following statement:
1 SELECT dbd_drop_all_workspaces();
- Open the Administration Tools and select Configuration Menu > Run Database Designer again.
The design process is running and a second user tries to create a design on a database where a workspace already exists.
1234 Design '<design name>' is runningTo check progress: execute select * from v_internal.vs_designsTo Cancel: execute select dbd_cancel_populate_design('<workspace name>','<design name>');
1 The design cannot be created because another design session is in progress
Check the progress of the design by querying the internal table vs_designs using the following command:
1 SELECT * FROM v_internal.vs_designs;
Cancel the design using the following command:
1 SELECT dbd_cancel_populate_design('<workspace name>','<design name>');
Hint: The output from the vs_designs table returns the workspace and design names