I have the same intermittent error when trying to to get to Win32_PerfRawData_PerfDisk_LogicalDisk
SET @output = ''
exec @OA_create_err=sp_OACreate 'WbemScripting.SWbemLocator', @WmiServiceLocator OUTPUT, 5
if @OA_create_err <> 0
begin
EXEC @OA_GetErrorInfo_err = sp_OAGetErrorInfo @WmiServiceLocator, @source OUT, @description OUT;
IF @OA_GetErrorInfo_err = 0
BEGIN
SET @output = @output + ' @WmiServiceLocator @OA_create_err: '+ convert(varchar(255),@OA_create_err) +' Source: ' + coalesce(@source, '') + ', Description: ' + coalesce(@description, '')
END
ELSE
BEGIN
SET @output = @output + ' sp_OAGetErrorInfo failed.'
END
set @message='Could not Create WbemScripting.SWbemLocator - ' + @output
exec sp_OADestroy @WmiServiceLocator
RAISERROR(@message, 16, 1)
return
end
exec @OA_method_err=sp_OAMethod @WmiServiceLocator, 'ConnectServer', @WmiService OUTPUT, '.', 'root\cimv2'
if @OA_method_err <> 0
begin
EXEC @OA_GetErrorInfo_err = sp_OAGetErrorInfo @WmiService, @source OUT, @description OUT;
IF @OA_GetErrorInfo_err = 0
BEGIN
SET @output = @output + ', @WmiService @OA_method_err, '+ convert(varchar(255),@OA_method_err) +' Source: ' + coalesce(@source, '') + ', Description: ' + coalesce(@description, '')
END
ELSE
BEGIN
SET @output = @output + ' sp_OAGetErrorInfo failed.'
END
set @message='Could not get ConnectServer - ' + @output
exec sp_OADestroy @WmiServiceLocator
RAISERROR(@message, 16, 1)
return
end