[DBCleaner] Cannot clear an attreibute's metadata when the attribute itself is manually deleted

Forge Component
(49)
Published on 2019-03-11 by Johan den Ouden
49 votes
Published on 2019-03-11 by Johan den Ouden

Hi,

The use case:

  • an entity's attribute is deleted using Service Studio
  • then it is manually deleted from the database (using MS SQL Server Management Studio)

This attribute is still displayed on Cleanup Database Entities screen. When "Drop" is clicked it says that the attribute is successfully dropped but still remains on the list. When I manually add this attribute to the entity (again using SQL SMS) "Drop" deletes it both from the table's structure and from OS metadata.

Tested in OS 10 version.

Could you improve it?

Regards

Tomasz


Solution

Tomasz M. Lipinski wrote:

Hi,

The use case:

  • an entity's attribute is deleted using Service Studio
  • then it is manually deleted from the database (using MS SQL Server Management Studio)

This attribute is still displayed on Cleanup Database Entities screen. When "Drop" is clicked it says that the attribute is successfully dropped but still remains on the list. When I manually add this attribute to the entity (again using SQL SMS) "Drop" deletes it both from the table's structure and from OS metadata.

Tested in OS 10 version.

Could you improve it?

Regards

Tomasz


Hi Tomas,


I would have to think about this. Programatically, it tries to do the drop of the column and if it fails, it has a rollback. Since you are circumventing the tool and doing things manually, I am not sure there is really an elegant way to handle it. There is not access to the System tables to see if the column still exists, so I really don't think we can do this.


Solution

Hi,

OK, if it is a problem so leave it.

My case is a case of a customer that initially had only small amount of Application Objects so I couldn't install DBCleaner. But I had an access to the database so I deleted the attributes manually (to stop ServiceStudio writing its warnings). Now they have enough AO; I have installed DBCleaner and seen a big list of old attributes.

But as I've written - it is only a matter of comfort so never mind.

Regards

Tomasz