Home > Archive > SQL Server JDBC > December 2005 > SQL 2000 90% CPU util, help!









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL 2000 90% CPU util, help!
Eric

2005-11-30, 8:23 pm

I've got a clustered SQL 2000 SP3 database that is killing the CPU on our
server. The db is 66% fragmented, and I need to figure out what is taking up
all the CPU cycles. The application that uses the db has recently switched
to JDBC driver. I've tried running SQL profiler and I dont see any large
usage in the CPU column. Is there any other way to find out what is causing
the problem. Thanks!

Joe Weinstein

2005-11-30, 8:23 pm



Eric wrote:

> I've got a clustered SQL 2000 SP3 database that is killing the CPU on our
> server. The db is 66% fragmented, and I need to figure out what is taking up
> all the CPU cycles. The application that uses the db has recently switched
> to JDBC driver. I've tried running SQL profiler and I dont see any large
> usage in the CPU column. Is there any other way to find out what is causing
> the problem. Thanks!
>


Is the application using prepared statements to do queries, and using
string parameters to set search arguments for varchar columns?
Joe Weinstein at BEA Systems

Eric

2005-11-30, 8:23 pm

I have little experience with the JDBC drivers, here is what it looks like in
Profiler.

declare @P1 int
set @P1=180169410
declare @P2 int
set @P2=4
declare @P3 int
set @P3=1
declare @P4 int
set @P4=-1
exec sp_cursoropen @P1 output, N'SELECT
ID,Start,UserID,Syst
emID,RoleProductID,R
oleApplicationID,Rol
eID,DeviceID,AuthTok
ens
FROM Session WHERE ID=@P1 ORDER BY ID', @P2 output, @P3 output, @P4 output,
N'@P1 nvarchar(4000) ', N'25ed5db0b43977494e
5b7da4dbc83a44'
select @P1, @P2, @P3, @P4

"Joe Weinstein" wrote:

>
>
> Eric wrote:
>
>
> Is the application using prepared statements to do queries, and using
> string parameters to set search arguments for varchar columns?
> Joe Weinstein at BEA Systems
>
>

Joe Weinstein

2005-12-01, 3:23 am



Eric wrote:

> I have little experience with the JDBC drivers, here is what it looks like in
> Profiler.
>
> declare @P1 int
> set @P1=180169410
> declare @P2 int
> set @P2=4
> declare @P3 int
> set @P3=1
> declare @P4 int
> set @P4=-1
> exec sp_cursoropen @P1 output, N'SELECT
> ID,Start,UserID,Syst
emID,RoleProductID,R
oleApplicationID,Rol
eID,DeviceID,AuthTok
ens
> FROM Session WHERE ID=@P1 ORDER BY ID', @P2 output, @P3 output, @P4 output,
> N'@P1 nvarchar(4000) ', N'25ed5db0b43977494e
5b7da4dbc83a44'
> select @P1, @P2, @P3, @P4


Ok, I am confident you want to add a property to your connection
properties:
sendStringParameters
AsUnicode=false

eg:
Properties p = new Properties();
p.put("user", "sa");
p.put("password", "");
p.put(" sendStringParameters
AsUnicode", "false");

Driver d = new com.microsoft.jdbc.sqlserver.SQLServerDriver();
c = d.connect(" jdbc:microsoft:sqlse
rver://QA75:1433", p);

Let us know...
Joe
[color=darkred]
>
> "Joe Weinstein" wrote:
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com