I'm pretty new to Magento and recently I encountered this weird situation where most of the tables in my db is missing and that includes all of the sales_??? as well where I assume it should be there. However, when someone does make an order, it is recorded inside the admin section but there is absolutely no record within the database..
Would highly be appreciated if someone could shed some light. My Magento version is 22.214.171.124 anyway. Thanks in advance.
If you can't find these tables in your database but Magento itself is working fine, they definitely should exist somewhere
If to view the database stats you are using the Web Interface like phpmyadmin, make sure that you have reviewed all pages, as because of some limitations, some tables can be found only on the 2d page:
In my case all the tables with the sales_ prefix were located there.
If it's not the case, I'd recommend you to review the latest changes that were implemented in the project, and check where and via which connection type the record when saving order is made (you may use Debug for that).
I experienced the same problem after an unsuccessful import of DB.
What worked for me?
I logged in through command line into MySQL and sourced again the database.
And this time it worked as expected.
There are other circumstances but what caught my eye was that there were missing all the tables related with sales_* .
Give it a try, I'm sure you'll fix your problem.
Here is the solution to deal with your Magento error:
I have written a detailed instruction, if you have any problems when following the guide, let me know and I can help.