How to delete a view? Getting message "Table name xxxx already exists"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-10-2018 05:59 PM
I deleted a view today and I need too recreate it, but when I try to create the view I get a message saying that "table name xxxx already exists" (where xxx is the view table name). I can not find this view in the list view, or in the dictionary; but servicenow thinks it exists. I am at Kingston version. What needs to be cleaned out to allow a new view with the same name to be created?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2018 04:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2019 08:12 AM
I contacted ServiceNow support about this, and it's a known problem with database table and view caching - PRB1330793. At the time of posting the dev team haven't provided a timeframe for a fix, but there is a workaround:
Run the following command in a script, replacing table_name with the name of the database view:
GlideTableManager.invalidateTable('table_name');
Then execute the script.
This should remove the entry from the table cache and allow you to recreate the database view.