At a recent project at a customer I noticed that the customer didn’t handle their alarms in Cisco Prime Infrastructure as there were to many.
The customer had enabled all categories and wasn’t using auto-clear. The result: 354.177 Alarms in the alarm view. Must I say that the PI was a bit slow?
The customer asked me if we could delete all the alarms and start over. Deleting alarms from the GUI can be done in 500 at a time and was not an option.
The solution? Delete directly from the database.
Disclaimer: Don’t try this at home! Touching the Prime Infrastructure database might kill your Prime Infrastructure.
First of all: You administrator user must be named admin. If not you can’t do sudo su -.
Prime-1#shell_enable //Enter Password twice// Prime-1#shell Enter shell access password : // We will need to be root // ade# sudo su - -bash-4.1# // We need the database password // ade # /opt/CSCOlumos/bin/getDatabaseParams.sh bbTkkfj299dkf // We need Oracle env // ade # su - oracle [oracle@xxxxxxxx01v ~]$ source oracleenv // Lets connect to the DB // [oracle@xxxxxxxx01v ~]$sqlplus wcsdba/bbTkkfj299dkf SQL*Plus: Release 220.127.116.11.0 Production on Fri Feb 12 10:36:34 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 18.104.22.168.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options // Lets delete all alarms // SQL>delete from alarm; 351911 rows deleted SQL>quit Disconnected from Oracle Database 11g Enterprise Edition Release 22.214.171.124.0 - 64bit Production