For several months it seemed to me that our UCCX 5 system was beginning to have trouble. At first it appeared as a problem with our wallboard system being unable to display the real-time data properly. I had deduced that queries to the db_cra database were taking 4 - 5 minutes to return data.
At first I called on the vendor for our wallboard, but they were unable to help stating that it was a UCCX database issue - and I agreed. I then went to Cisco TAC and fed them all my information and asked them for help. They also were unable to help figure out what was happening, but they could see that the SQL queries that used to take 2 seconds were now taking several minutes. Since the wallboard system queried the database every 10 seconds, it was over-taxing the database.
This began to cause little anomalies in things like call-distribution, dropped calls, slow to no Historical reports returns, and this ultimately began to cause failovers to our backup node. I could not go a day without a failover and I had to reboot the servers almost every night.
I felt there was no solution and was afraid we needed to replace our system.
After talking to all the engineers around the world, my solution came from our very own SQL administrator. Within 5 minutes he was able to resolve all our issues.
The root of our problem was that the indexing of the db_cra database was extremely fragmented.
He wrote a SQL sript that he had me run against the database and he told me that this would correct any indexing issues.
It worked like a charm.
The system stopped behaving poorly immediately. This resolved many of our problems that I had been living with for a long time. It made the Admin page work so much faster, call distribution issues halted, the wallboard is running faster than ever with real-time data, and the list goes on. This resolved so many smaller issues that I cannot even list them all.
I would advise anyone using a SQL database, whether it be a Cisco product or not, to always keep their database 'defragmented'.
My SQL admin also setup the script to run automatically, on a schedule to keep our database running like a Ferrari. It has been sweet ever since.
KEEP YOUR INDEXES CLEAN AND YOU WILL REAP HAPPINESS!