In our order list, there are some which due to upgrading the payment module can not be viewed and we are getting the error "The requested Payment Method is not available". Considering that we already shipped the products regarding these orders, is it safe to delete them through sql query? Or updating the order status in "sales_flat_order_grid" and "sales_flat_order"? what would be the best action?
Yes, if you don't use Magento for sales reporting, you can delete complete orders or change their payment method. You can update
sales_flat_order_payment and change the invalid
method values, as described here:
In which table payment method information of order save
sales_flat_order_grid table only contains records that are visible on the grid. So if you remove any record from that table, the overall order storage will not be impacted and you'll not see this order on the grid. However this way there is no chance to get it back.
Some extensions exist that allow to archive orders. They basically work the following way: archived order information is being copied to another (new) table, and removed from original one. So you always have an option to restore.