Removing used design elements

Hiwe have a suite of databases with a huge amount of views. we are trying to find out which ones are not used so that we can remove them.

So far, my ideas are:

  1. Check the view index size of each one and if it’s “0” I can assume it’s not used.

  2. Run a design synopsis and search through it for view names. If they don’t appear, I can assume that no code is referencing that view.

I realise that both these methods are open to errors e.g if someone rebuilds all the views with Ctrl Shift F9 then all views will have an index size.

Does anyone have any better ideas/tools to help with this?

Thanks

Mark.

Subject: RE: Removing used design elements

It’s hard to be certain that a view is not used, since it may be referred to by another application. Also, keep in mind that it may be referenced by its name or alias. It can also happen that the name is calculated; this is uncommon, but I can imagine situations where, e.g., there’s a view for each department, and code to calculate which view the user should be sent to when they click a navigator control based on their role. This might use code like:

dept := @If(@UserRoles = …);

viewName := “CommonPrefix” + dept

The view design note, like other notes, has a “last accessed” date that you can access thru code. That might be a good indication of when the view was last used. Note, however, there’s a database option to not maintain this information. You might see when the modified date is updated.

Subject: Removing used design elements

If a third party solution is an option, I’d suggest TeamStudio’s Configurator product. It allows a much more methodical approach to finding design element references. It has been well-worth the cost in terms of time and effort saved when doing this sort of thing. If you’re interested, I’ve got a little VB utility I wrote to search an entire server via Configurator (although it won’t find computed view names as Andre mentioned).hth,

dgg

Subject: RE: Removing used design elements

Thank you both for your help.