Archive for March 2012

pmp-check-mysql-deleted-files plugin issue

Warning: count(): Parameter must be an array or an object that implements Countable in /home/fbsqlcom/public_html/ on line 31

I’ve been busy setting up the Percona Nagios MySQL Plugins  but ran into an issue with the pmp-check-mysql-deleted-files plugin; UNK could not list MySQL’s open files After a little debugging we tracked this down to a problem caused by running multiple instances of mysqld. This is something the script author (Baron Schwartz) mentions in his […]

Quick Linux Tip: rpm query & xclip

I’m working on a script to do some basic auditing of my Linux servers. One thing I want to record is the install details from an rpm query. The following command will provide us with some basic details of the rpms installed and ordered by date. ?View Code BASHrpm -qa –queryformat ‘%{NAME} %{VERSION} %{INSTALLTIME:date}\n’ –last; […]

Check the SQL Server Service Account Can Write the SPN

I don’t have access, like many DBAs, to the inner bowels of Active Directory.  While I’m more than happy for it to stay this way I still want to check that certain things have been setup correctly and haven’t been “cleaned-up” by a security nazi focused domain administrator. One such situation arose recently with Service Principal Names. SPNs […]

MySQL Database Maintenance Stored Procedure

UPDATED VERSION: MySQL Database Maintenance Stored Procedure Here’s a very simple stored procedure I use to run some maintenance on MySQL tables. It allows you to run OPTIMIZE TABLE or ANALYZE TABLE on all (or most) tables in a MySQL database. ?View Code MYSQLDELIMITER $$   DROP PROCEDURE IF EXISTS `db_maintenance`$$   CREATE DEFINER = […]