Browsed by
Category: Databases

CiviCRM: Missing indexes after upgrade

CiviCRM: Missing indexes after upgrade

After upgrading our CiviCRM we got a notification about missing indexes. It turns out (according to stack overflow) it’s pretty easy to solve if you have drush installed. List all missing indexes drush ev ‘civicrm_initialize();print_r(CRM_Core_BAO_SchemaHandler::getMissingIndices())’ (re)Create all drush cvapi System.updateindexes

Install Elasticsearch on Ubuntu

Install Elasticsearch on Ubuntu

Elastic search is an opensource NoSQL database that is scalable and lightning fast. It has a number of applications, the two most commonly used are log analysis/management and as a search backend. These are my install notes to get it up and running on an ubuntu/debian machine. Elastic provides a very good installation guide if you want to check that out too. If installing on an Azure machine double check firewall settings and make sure not everyone is allowed to…

Read More Read More

MariaDB/MySQL group by error

MariaDB/MySQL group by error

After we upgraded our MySql/MariaDB installation to 5.7.16 our CiviCRM gave us some “unknown DB errors”. We traced it back to a group by error thrown by MySql. As of version 5.7.5 the default SQL modes includes the ONLY_FULL_GROUP_BY option. To fix this issue you can of course change your code, but if that isn’t an option, you can remove this mode setting. First select your existing modes: mysql> SELECT @@SQL_MODE, @@GLOBAL.SQL_MODE; This will output all enabled modes. Copy both…

Read More Read More

Execute large SQL script on MS SQL server

Execute large SQL script on MS SQL server

Having trouble executing a large SQL script using the SQL server management studio? Use the command line tool sqlcmd sqlcmd -S server\instance -i script_file.sql This should work, unless you have errors in your script of course 😉 Don’t forget to start your script with a correct use statement. use databaseNameHere;

Latest Redis on Debian 6 “Squeeze” using PPA

Latest Redis on Debian 6 “Squeeze” using PPA

Currently Debian 6 comes with a Redis database version of 1. If you enable Debian backports you can upgrade to version 2, but if you want the latest version you can do the following. vi /etc/apt/sources.list.d/redis.list add deb http://ppa.launchpad.net/chris-lea/redis-server/ubuntu lucid main You will get a GPG error: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY B9316A7BC7917B12 Use apt-key to add the public key to the trusted keys apt-key adv…

Read More Read More