CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Is it possible to store log entries in different database in civicrm?
Pages: [1]

Author Topic: Is it possible to store log entries in different database in civicrm?  (Read 350 times)

manikandan.civicrm

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • Cool in Coding
    • Linux, Apache, MySQL, PHP
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: MySQL 5.5.38
  • PHP version: PHP 5.5.15
Is it possible to store log entries in different database in civicrm?
January 22, 2015, 10:08:00 am
I have more than 40K users in my civirm web application. I enabled the log to track the each users activity in the system. But now the log tables are become too much big. Due to that my application performance is affecting. So I thought to decide storing log tables in different database. Is it good idea if yes, this facility is  already available in civi? Please reply.


Thanks in advance

manikandan.civicrm

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • Cool in Coding
    • Linux, Apache, MySQL, PHP
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.34
  • MySQL version: MySQL 5.5.38
  • PHP version: PHP 5.5.15
Re: Is it possible to store log entries in different database in civicrm?
January 23, 2015, 06:38:31 am
At last I found out the solution myself. It's already available in civicrm itself. In civicrm.settings.php file, by default we are tracking the log in same database like below.

Code: [Select]
define( 'CIVICRM_DSN' , 'mysql://username:password@host/database?new_link=true' );

define('CIVICRM_LOGGING_DSN', CIVICRM_DSN);

So we can change the CiviCRM Logging into different database by changing the variable CIVICRM_LOGGING_DSN.

Code: [Select]
define( 'CIVICRM_LOGGING_DSN' ,'mysql://username:password@host/log_database?new_link=true' );

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Is it possible to store log entries in different database in civicrm?

This forum was archived on 2017-11-26.