NAV 2009: Corrupt / Deleted METADATA of hidden Systemtables

When working with Microsoft Dynamics NAV it can happen that you receive a message about metadata-problems while trying to open the RTC.

This is no problem, you simply have to compile the object and everything is fine again. In some early builds there were cases when you had to delete the metadata of this objects before compiling it again.

But what to do if the object is a hidden systemtable? You cannot choose it in Object Designer for compiling.

Or even worse, you accidentally deleted all metadata.

To fix this problem you should set the database to Single user and disable the database for Microsoft Dynamics NAV Server.

This can be done with alter database. Afterwards you re-enable for Microsoft Dynamics NAV and remove the single user flag again.

This causes the Client to recompile most of the objects, including system-tables.