“You do not have a paid license for production companies” license error in Business Central (cloud BacPac restore)
We currently had a customer’s requirement to create a local test environment from a Business Central Cloud backup (BacPac). To achieve this using Docker, FreddyK’s blog post is very helpful and recommended. After we cleared all the hurdles and had a working database, we constantly ran into the following License error in Business Central when switching from CRONUS to a “production” company:
“You cannot open the company because you do not have a paid license for production companies”
![License error in Business Central](https://www.j3ns.de/wp-content/uploads/2021/09/2021-09-01-10_31_55-Window.png)
Finally, the error can be solved by deleting all old entries from the [dbo].[Tenant License State] table…
![2021 09 01 10 28 38 Window](https://www.j3ns.de/wp-content/uploads/2021/09/2021-09-01-10_28_38-Window.png)
…and then cleanly importing your partner license using Import-BcContainerLicense():
![2021 09 01 10 23 39 Window 1](https://www.j3ns.de/wp-content/uploads/2021/09/2021-09-01-10_23_39-Window-1.png)