Tuesday, March 27, 2012

Can I get Total CPU usage or Memory use by TSQL

Hi
I dont have direct access to Server Terminal.
Can I get Server CPU Utilization and total memory use and memory use
by sql server using TSQL?
Regards
Amish Shah
Hi
It is not clear what you are looking for hear. You may want to look at the
set options:
SET SET STATISTICS IO ON
SET SET STATISTICS TIME ON
or look at SQL Profiler.
John
"amish" wrote:

> Hi
> I dont have direct access to Server Terminal.
> Can I get Server CPU Utilization and total memory use and memory use
> by sql server using TSQL?
> Regards
> Amish Shah
>
|||Actually I want to know total cpu utilization and memory utilization of
server and how much sql server consuming in this both. I can connect to
the server only by sql server. I dont have windows user/password.
So, is there any way i can get this information by tsql?
Thanks
AM
*** Sent via Developersdex http://www.codecomments.com ***
|||Hi
You may want to look at @.@.CPU_BUSY, @.@.IDLE, @.@.TIMETICKS or sp_monitor
You may also want to check out DBCC RESOURCE at
http://www.transactsql.com/html/DBCC%20RESOURCE.html
and other dbcc commands such as DBCC PERFMON, DBCC PROCCACHE, DBCC BUFFER
although I am not sure where to find total memory used.
Also look at sp_configure to find out the maximum configured value.
John
"AM" wrote:

> Actually I want to know total cpu utilization and memory utilization of
> server and how much sql server consuming in this both. I can connect to
> the server only by sql server. I dont have windows user/password.
> So, is there any way i can get this information by tsql?
> Thanks
> AM
> *** Sent via Developersdex http://www.codecomments.com ***
>
|||Some times CPU Utilization of my server goes upto 80% to 100 %. I want
to get this detail using TSQL.
I also want to know how much % sql server taking of over all cpu
utilization.
I want to do all this using SQL Server.
Thanks
AM
*** Sent via Developersdex http://www.codecomments.com ***
|||Hi
This is really the job of performance monitor, and this will give you a
pro-active method of monitoring it. I suggest you get the system admin to set
these up. If you are using MOM or similar you can do it that way.
John
"AM" wrote:

> Some times CPU Utilization of my server goes upto 80% to 100 %. I want
> to get this detail using TSQL.
> I also want to know how much % sql server taking of over all cpu
> utilization.
> I want to do all this using SQL Server.
>
> Thanks
> AM
> *** Sent via Developersdex http://www.codecomments.com ***
>

No comments:

Post a Comment