Answers.Body: <p>Fortunately, in CiviCRM 4.7 (and Civi 4.6.17+), installing ANY extension will recreate your missing logging tables.  Not that enabling an extension isn't sufficient - you must install an extension.  See <a href="https://issues.civicrm.org/jira/browse/CRM-15078" rel="noreferrer">CRM-15078</a></p>
  
  <p>The reason this works:  If advanced logging is enabled, extensions without a corresponding logging table will generate errors.  Because an extension can add a table, there's a function that runs whenever an extension is installed called "fixSchemaDifferences".  It checks for any tables without a corresponding logging table and generates it - whether or not that table was added by the extension or not.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-20T18:50:33.453Z
Answers.Text: That's the one I fixed at the sprint last year :)
Answers.UserDisplayName: DaveFF
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-20T18:52:27.527Z
Answers.Text: You should also be able to call the Extension.install API on an extension that is already installed, if you just want to fix the logging tables.
Answers.UserDisplayName: DaveFF
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-07T00:47:31.413Z
Answers.Text: overheard on [chat.civicrm.org](https://chat.civicrm.org/civicrm/pl/y4anay146pdpjbbmtqhyqcafeh) - the `System.flush` API has a `triggers` parameter, so: `drush cvapi System.flush triggers=1`
Answers.UserDisplayName: Chris Burgess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-20T00:56:48.317Z
Answers.LastActivityDate: 2016-09-20T00:56:48.317Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>2019 UPDATE - In case anyone finds this question there is an answer at <a href="https://civicrm.stackexchange.com/questions/28019/civi-5-9-db-error-no-such-table-cannot-disable-logging">Civi 5.9 - DB Error: no such table / cannot disable logging</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-11T11:52:23.777Z
Answers.LastActivityDate: 2019-01-11T11:52:23.777Z
Answers.UserDisplayName: Davy Ivins
Answers.Body: <p>I close this question here : things are a bit more complicated : I report a more extended question here : </p>
  
  <p><a href="https://civicrm.stackexchange.com/questions/15062/help-lots-of-troubles-malfunctions-errors-civi-4-7-6-and-4-7-11-dru">https://civicrm.stackexchange.com/questions/15062/help-lots-of-troubles-malfunctions-errors-civi-4-7-6-and-4-7-11-dru</a></p>
  
  <p>Thanks anyway</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-09-23T15:42:24.153Z
Answers.LastActivityDate: 2016-09-23T15:42:24.153Z
Answers.LastEditDate: 2017-04-13T12:53:13.017Z
Answers.UserDisplayName: Jacques-Marie Moranne
Body: <p>I am on Civi 4.7.6 / Drupal 7.5</p>
  
  <p>I have not been able to record any new phone numbers for some days (via Webform Integration).</p>
  
  <p>I realize that I have lost a number of log_civicrm_... tables (those alphabetically beyond ..._payment_processor_type), and this can be the reason why.</p>
  
  <p>Thus, I would like to disable logging (via Administer > System Settings >Misc (...) > Logging), but I get this error : "Save failed : DB Error : unknown error".</p>
  
  <p>I assume that this error is due to those missing tables.</p>
  
  <p>How can I get out of that ? (I am not a programmer)</p>
  
  <p>...</p>
  
  <p>As a matter of fact, I have an other Test Civicrm, where logging is disabled, and when I want to enable it, I get the same error, and there is no enabling.</p>
  
  <p>Anything in relationship with Drupal ?</p>
  
  <p>BTW, I have all privileges on thoses DBs</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-19T14:02:36.747Z
Comments.Text: You might want to activate debug and backtrace (civicrm/admin/setting/debug?reset=1) so you could have more information about the error you get.
Comments.UserDisplayName: samuelsov
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-19T21:22:01.030Z
Comments.Text: Does "I have not been able to record any new phone numbers for some days (via Webform Integration)" mean that you can update phone numbers directly on the civicrm record?
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-09-21T14:34:29.900Z
Comments.Text: @Jacques - please post any updates that aren't answers as comments or by updating your original question, not separate answers please :)  You mention a DB error, but that's not much information.  In CiviCRM, please go to **Administer menu > System Settings > Debugging and Error Handling**, select "Yes" to both "Enable Debugging" and "Display Backtrace", and press "Save".  Repeat the problem that caused your error, and you'll see much a much more detailed error. Please update this question with the expanded error and backtrace - and don't forget to disable debugging/backtrace when you're done!
Comments.UserDisplayName: Jon G - Megaphone Tech
Tags: <logs><logging>
Title: Impossible to disable logging
ThreadText: # Impossible to disable logging
  
  (Asked by: username_0 on 2016-09-19)
  
  I am on Civi 4.7.6 / Drupal 7.5
  
  I have not been able to record any new phone numbers for some days (via Webform Integration).
  
  I realize that I have lost a number of log\_civicrm\_... tables (those alphabetically beyond ...\_payment\_processor\_type), and this can be the reason why.
  
  Thus, I would like to disable logging (via Administer > System Settings >Misc (...) > Logging), but I get this error : "Save failed : DB Error : unknown error".
  
  I assume that this error is due to those missing tables.
  
  How can I get out of that ? (I am not a programmer)
  
  ...
  
  As a matter of fact, I have an other Test Civicrm, where logging is disabled, and when I want to enable it, I get the same error, and there is no enabling.
  
  Anything in relationship with Drupal ?
  
  BTW, I have all privileges on thoses DBs
  
  **Tags:** logs, logging
  
  > **Comments:**
  > **username_1**: You might want to activate debug and backtrace (civicrm/admin/setting/debug?reset=1) so you could have more information about the error you get.  
  > **username_2**: Does "I have not been able to record any new phone numbers for some days (via Webform Integration)" mean that you can update phone numbers directly on the civicrm record?  
  > **username_3**: @Jacques - please post any updates that aren't answers as comments or by updating your original question, not separate answers please :)  You mention a DB error, but that's not much information.  In CiviCRM, please go to **Administer menu > System Settings > Debugging and Error Handling**, select "Yes" to both "Enable Debugging" and "Display Backtrace", and press "Save".  Repeat the problem that caused your error, and you'll see much a much more detailed error. Please update this question with the expanded error and backtrace - and don't forget to disable debugging/backtrace when you're done!  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_3 on 2016-09-20. Score: 5
  
  Fortunately, in CiviCRM 4.7 (and Civi 4.6.17+), installing ANY extension will recreate your missing logging tables. Not that enabling an extension isn't sufficient - you must install an extension. See [CRM-15078](https://issues.civicrm.org/jira/browse/CRM-15078)
  
  The reason this works: If advanced logging is enabled, extensions without a corresponding logging table will generate errors. Because an extension can add a table, there's a function that runs whenever an extension is installed called "fixSchemaDifferences". It checks for any tables without a corresponding logging table and generates it - whether or not that table was added by the extension or not.
  
  > **Comments:**
  > **username_4**: That's the one I fixed at the sprint last year :)  
  > **username_4**: You should also be able to call the Extension.install API on an extension that is already installed, if you just want to fix the logging tables.  
  > **username_5**: overheard on [chat.civicrm.org](https://chat.civicrm.org/civicrm/pl/y4anay146pdpjbbmtqhyqcafeh) - the `System.flush` API has a `triggers` parameter, so: `drush cvapi System.flush triggers=1`  
  
  ---
  
  ### Answer by username_6 on 2019-01-11. Score: 1
  
  2019 UPDATE - In case anyone finds this question there is an answer at [Civi 5.9 - DB Error: no such table / cannot disable logging](https://civicrm.stackexchange.com/questions/28019/civi-5-9-db-error-no-such-table-cannot-disable-logging)
  
  
  ---
  
  ### Answer by username_0 on 2016-09-23. Score: 1
  
  I close this question here : things are a bit more complicated : I report a more extended question here :
  
  <https://civicrm.stackexchange.com/questions/15062/help-lots-of-troubles-malfunctions-errors-civi-4-7-6-and-4-7-11-dru>
  
  Thanks anyway
  
  
  ---
  
  