After deleting the DX NetOps Performance Management integration in CA Spectrum, Error dropping database generated
search cancel

After deleting the DX NetOps Performance Management integration in CA Spectrum, Error dropping database generated

book

Article ID: 138912

calendar_today

Updated On:

Products

CA Spectrum CA Performance Management - Usage and Administration DX NetOps

Issue/Introduction

After deleting the spectrum data source in DX Netops Portal, then when attempting to drop the netqos_integ table in spectrum, the following error is generated:

mysql> drop database netqos_integ;
ERROR 1010 (HY000): Error dropping database (can't rmdir '.\netqos_integ', errno: 41)

Cause

The issue here is that there is still a file located in the netqos_integ db data directory.The drop table SQL command technically worked, but there is an external (possibly non-MySQL db related or created) file still in that directory that tells the MySQL engine that it hasn't been cleared out. This is indicated by the errno (Error Number) 41.

 

Resolution

cd $SPECROOT/mysql/data/netqos_integ

Then check what's in there. Normally, it will look similar to;

spec-OC:[/usr/Spectrum/mysql/data/netqos_integ] $ ls -l
total 272
-rw-rw----. 1 spectrum spectrum 61     Jul 2  23:37 db.opt
-rw-r-----. 1 spectrum spectrum 8720   Sep 15 22:40 interface_addresses.frm
-rw-r-----. 1 spectrum spectrum 0      Sep 15 22:40 interface_addresses.MYD
-rw-r-----. 1 spectrum spectrum 1024   Sep 15 22:40 interface_addresses.MYI
-rw-r-----. 1 spectrum spectrum 8876   Sep 15 22:40 item_model_mapping.frm
-rw-r-----. 1 spectrum spectrum 147456 Sep 15 22:40 item_model_mapping.ibd
-rw-r-----. 1 spectrum spectrum 8712   Sep 15 22:40 old_event_mapping.frm
-rw-r-----. 1 spectrum spectrum 0      Sep 15 22:40 old_event_mapping.MYD
-rw-r-----. 1 spectrum spectrum 1024   Sep 15 22:40 old_event_mapping.MYI
-rw-r-----. 1 spectrum spectrum 8608   Sep 15 22:40 pollers.frm
-rw-r-----. 1 spectrum spectrum 0      Sep 15 22:40 pollers.MYD
-rw-r-----. 1 spectrum spectrum 1024   Sep 15 22:40 pollers.MYI
-rw-r-----. 1 spectrum spectrum 8602   Sep 15 22:40 registry.frm
-rw-r-----. 1 spectrum spectrum 48     Sep 15 22:40 registry.MYD
-rw-r-----. 1 spectrum spectrum 1024   Sep 19 01:56 registry.MYI
-rw-r-----. 1 spectrum spectrum 9058   Sep 15 22:40 schemaversion.frm
-rw-r-----. 1 spectrum spectrum 292    Sep 15 22:40 schemaversion.MYD
-rw-r-----. 1 spectrum spectrum 9216   Sep 19 01:56 schemaversion.MYI
-rw-r-----. 1 spectrum spectrum 9058   Sep 15 22:40 schemaversion_recurring.frm
-rw-r-----. 1 spectrum spectrum 0      Sep 15 22:40 schemaversion_recurring.MYD
-rw-r-----. 1 spectrum spectrum 4096   Sep 15 22:40 schemaversion_recurring.MYI


After dropping the netqos_integ, it should be empty. However, if it has only one or two files, then it means the drop db command was successful but you have to now manually delete what's left in the directory ($SPECROOT/mysql/data/netqos_integ).