v188 Make the SQL debugging a globally configurable item.
(cherry picked from commit 9f55b7dc536876df2624fa42cc74883a19ea8738)