'Microsoft Dynamics NAV 2009 How to remove objects outside of license?

During an upgrade process from 2009 to 2016 I'm trying to remove objects relating to an old discontinued product. The objects are not within the range of or license and consists of both Forms, Tables and Reports. When deleting I'm faced with the well known error:

"You do not have permission to delete the '[object name]' Table."

I've tried with my developers license and the customers license with no luck. Since the product is no longer existing there is no use keeping these objects around and I need them gone for the upgrade process.

What is the best approach or technique when deleting objects that's not in the license?

UPDATE: How this issue was resolved? I got in contact with the product owner and explained my problem. They sent me a neat PowerShell script to run. This worked like a charm. Reading through the script I can see that it's using the SQL cmdlets to select and delete relevant data from the following SQL tables:

Objects, Object Metadata, Object Metadata Snapshot, Object Tracking, Object Translation, Permission.

This was the preferred method of the product owner who used to develop this product. It should be applicable to all NAV objects. I have not yet successfully tried one of the answers below (more tries to come). Hopefully this new information will provide someone with enough knowledge to provide a good answer.



Solution 1:[1]

Create new empty database, export only needed objects from old database, import them to new database. In Nav 2016 application database can be separated from data containing database so (I assume) you could just unmount it from database with old objects and mount it to new application database. Not sure tbh.

Solution 2:[2]

It is due to the range of the license, for example your development license has a range of tables 7.000.000 - 7.000.200. If you want to delete a table with ID 20.000.000 you have that error.

The best solution is when you do the updrage do not you consider these objects you need to delete. Exports all objects except the objects you want to delete.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mak Sim
Solution 2 Jonathan Bravetti