Posts

Showing posts from June, 2023

VMWare Tools greyed out in VMWare Work stations

Image
1) Right click on the VM  "Install VMWare tools" is greyed out. 2) To install this shut down or power off the system and right click on the VM-->Settings--> REMOVE floppy as the image shown below. After you are removing the floppy click Ok and restart the VM. After restarting the server, go to settings and now you could see that now "Install VM Ware tool" is pop up and click on it an you could see the setup file like this in the server and double click on it and install it.  

Minute wise SQL Server CPU consumption calculation.

The query below will calculate the minute wise SQL Server CPU calculation. It will push the data into a Physical table called "Main". There would be a record for each minute handled elimanaton of duplicate records if you run the query multiple times. --- /* ----2023-06-16 15:04:00.000 SELECT * FROM Main ORDER BY EventTime DESC DELETE FROM Main --- */ DECLARE @ ts_now bigint = ( SELECT cpu_ticks / (cpu_ticks / ms_ticks) FROM sys.dm_os_sys_info); MERGE Main AS Targets USING ( SELECT TOP( 60 ) SQLProcessUtilization AS [ SQL Server Process CPU Utilization], SystemIdle AS [ System Idle Process], 100 - SystemIdle - SQLProcessUtilization AS [Other Process CPU Utilization], left ( convert ( varchar ( 16 ),DATEADD(ms, - 1 * ( @ ts_now - [ timestamp ]), GETDATE()), 120 ), 16 ) AS [Event Time] FROM ( SELECT record.value( '(./Record/@id)[1]' , 'int' ) AS record_id, record.value( '(./Record/SchedulerMonitorEvent/SystemHealth/SystemIdl