[cisco-voip] UCCX SQL queries spiking CPU on my SQL server
Matthew Loraditch
MLoraditch at heliontechnologies.com
Wed Dec 2 10:29:37 EST 2009
Wes,
I had done some googling and found some of what you mention but that profiler is a gold mine. What I am seeing is UCCX constantly executing this query:
exec ..sp_tables N'',N'%',N'',NULL
this seems to be a system thing as that is a query to list tables in the DB and it's not in my script anywhere and I have no idea why UCCX would need a list of tables.
Any ideas? Since this isn't being caused by the Script as far as I can tell, would TAC be able to help?
[cid:image001.jpg at 01CA7339.E210C380]
Matthew Loraditch
1965 Greenspring Drive
Timonium, MD 21093
support at heliontechnologies.com<mailto:support at heliontechnologies.com>
(p) (410) 252-8830
(F) (443) 541-1593
Visit us at www.heliontechnologies.com<http://www.heliontechnologies.com>
Support Issue? Email support at heliontechnologies.com<mailto:support at heliontechnologies.com> for fast assistance!
From: Wes Sisk [mailto:wsisk at cisco.com]
Sent: Wednesday, December 02, 2009 9:52 AM
To: Matthew Loraditch
Cc: cisco-voip at puck.nether.net
Subject: Re: [cisco-voip] UCCX SQL queries spiking CPU on my SQL server
interesting approach. SQL server has reporting and diagnostic abilities to report all of this.
a few pointers that may help:
sql profiler - basically a packet sniffer for sql. sql profiler can track transactions, execution time, cpu cycles, and other useful diagnostic information.
sql query analyzer - offers an option to show 'execution plan'. SQL statements ideally use indexes to perform selects, updates, etc. If you don't use an index you end up performing a 'table scan'. A 'table scan' loads every row one at a time to compare criteria. This is very suboptimal. Use of an index is heavily dependent on your the clauses in your SQL statements. Even a reordering of the clauses can can significant performance impact. take the queries that you execute from UCCX (capture using profiler above) and run them through sql query analyzer with the option to show execution plan. If you're accessing a large table and not using an index then you will need to reorder your statement or create new index.
a few very handy SQL commands -
'sp_who2' - show active connections to SQL server, spid, active transactions, and transaction execution time. This is the easiest way to identify a resource hog from the server side.
Keep in mind that UCCX potential to "keep some sort of constant open" is heavily dependent on the script that you authored to perform the database access.
'sp_lock' - show active locks in the database. With multiple applications accessing the same database you increase the potential for concurrent locks and the ever feared deadlock scenario. If you are making SQL statements that cause grabbing and holding locks then you are going to get into serious contention with other applications attempting to access the same information.
HTH.
/Wes
On Wednesday, December 02, 2009 8:16:26 AM, Matthew Loraditch <MLoraditch at heliontechnologies.com><mailto:MLoraditch at heliontechnologies.com> wrote:
I have one script that does a pretty simple sql query if a customer enters a ticket number to find the assigned tech, yet somehow my SQL Admin is reporting the account I have doing that is chewing up the CPU on the SQL server. We have other Apps that pull from the same DB every 5 seconds yet they aren't causing the same Issue. Does the DB Subsystem in UCCX keep some sort of constant open on a SQL db?
Thanks!
Matthew Loraditch
1965 Greenspring Drive
Timonium, MD 21093
support at heliontechnologies.com<mailto:support at heliontechnologies.com>
(p) (410) 252-8830
(F) (443) 541-1593
Visit us at www.heliontechnologies.com<http://www.heliontechnologies.com>
Support Issue? Email support at heliontechnologies.com<mailto:support at heliontechnologies.com> for fast assistance!
________________________________
_______________________________________________
cisco-voip mailing list
cisco-voip at puck.nether.net<mailto:cisco-voip at puck.nether.net>
https://puck.nether.net/mailman/listinfo/cisco-voip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20091202/ff474b5e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 33011 bytes
Desc: image001.jpg
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20091202/ff474b5e/attachment.jpg>
More information about the cisco-voip
mailing list