VMware Communities > VMTN > VMware vCenter™ > VMware vCenter™ Server > Discussions

This Question is Possibly Answered

1 "correct" answer available (10 pts)
13 Replies Last post: Oct 16, 2008 3:36 PM by pomiwi
Reply

Upatemanager (vc2.5) There are errors during the scan operation

Feb 8, 2008 5:20 AM

Click to view jobo's profile Novice jobo 10 posts since
Jun 3, 2005

I'm not able to scan one of my w2k3 VM's for updates.


I get the following error:

There are errors during the scan operation

Failed to scan <VM-HOSTNAME> for updates.

An unknown internal error occured during the required operation on <VM-HOSTNAME>. Please check the log for more details and retry the operation.


In the log file i did find the following error message.

--2008-02-08 10:58:12:796 'SingleOnlineScanTask.SingleOnlineScanTask{5}' 5948 ERROR-- singleOnlineScanTask, 532 SingleOnlineScanTask{5} encountered error: exception message: "ODBC error: (22001) - MicrosoftSQL Native ClientSQL ServerString or binary data would be truncated." is returned when executing SQL statement "INSERT INTO VCI_SCANRESULTS_TARGETS (scanh_id, update_id, target_uid, target_status, oem_patch_info) VALUES (?, ?, ?, ?, ?)"


Is there anyone who has a clue about whats wrong here?


I have tried, reinstall updatemanager, removed/recreated the updatemanager DB and reinstalled the update manager guest agent several times without success.

I have about 50 VM's and there are only this one that has this problem.

Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 7:02 AM
Click to view rossiauj's profile Novice rossiauj 18 posts since
Mar 27, 2006

Hi,

Asuming there is nothing wrong with your VC database or with your guest I would run SQL Profiler from the SQL Server Management Studio (you are running SQL 2005, if not it is also SQL Profiler, but from Enterprise Manager). I use the TSQL_Replay template and filter it on DatabaseName LIKE "<The name of the VUM database>".

Let it run while you are doing a scan of that particular VM and when the error appears, stop the trace and look for VCI_SCANRESULTS_TARGETS in the TextData column. Probably the last one in the trace is the culprit. SCANH_ID, UPDATE_ID, TARGET_UID and TARGET_STATUS are all of type INT, so if the error complains about binary or string data being truncated, it cannot be them (i think). So the only thing that can be the problem is OEM_PATCH_INFO which is of type VARCHAR. This OEM_PATCH_INFO is limited to 1000 characters.

My profiler found something like this for each patch in the baseline:

=======================================================

declare @p1 int

set @p1=NULL

exec sp_prepexec @p1 output,N'@P1 int,@P2 int,@P3 nvarchar(10),@P4 int,@P5 nvarchar(522)',N'INSERT INTO VCI_SCANRESULTS_TARGETS (scanh_id, update_id, target_uid, target_status, oem_patch_info) VALUES (@P1, @P2, @P3, @P4, @P5)',22,634,N'vm-16',1,N'<Patches><Missing></Missing><Installed><Patch><SP>SP2</SP><Product>Windows Server 2003, Standard Edition</Product><LanguageID>0409</LanguageID><BulletinID>MS06-078</BulletinID><PatchKey>WindowsMedia6-KB925398-x86-ENU.exe</PatchKey></Patch></Installed></Patches>'

select @p1

=======================================================

So, if your patch info (the last field) is longer than 1000 Characters you may have found the problem. I would exclude this particular patch from the baseline and try again.

If your scan keeps failing for this VM with every patch, well, in that case, I don't know what is wrong with your system, reinstalling that VM would be a good idea ;-)

I hope this helps.

Greetings,

Jos Rossiau

Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 7:34 AM
in response to: rossiauj
Click to view jobo's profile Novice jobo 10 posts since
Jun 3, 2005
I only have SQL2005 Express which does not include SQL profiler(atleast for what I know). Is there another way to check this out?
Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 7:44 AM
in response to: jobo
Click to view rossiauj's profile Novice rossiauj 18 posts since
Mar 27, 2006

Hi,


I normally do not work with SQL 2005 Express, but I found this on the internet: http://sqlprofiler.googlepages.com/.

It is an opensource sql 2005 Express profiler. I haven't tried it out yet, but it looks promising.

Greetings,

Jos Rossiau

Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 1:09 PM
in response to: rossiauj
Click to view jobo's profile Novice jobo 10 posts since
Jun 3, 2005
Thaks ,, i did just find that one myself ,,but I'm not really sure if I get something useful from it :) (new to this sql trace stuff)

However I think this one is causing the problem..

declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,N'@P1 int,@P2 int,@P3 nvarchar(12),@P4 int,@P5 nvarchar(3258)',N'INSERT INTO VCI_SCANRESULTS_TARGETS (scanh_id, update_id, target_uid, target_status, oem_patch_info) VALUES (@P1, @P2, @P3, @P4, @P5)',165,854,N'vm-101',0,N'SP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934458-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934459-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934458-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934459-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934458-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934459-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934458-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934459-x86-ENU.exe'
select @p1


The insert string above is about 1630 characters..


The server in question is running 4 instances of SQL server 2005, that's probably why the string formatted this way. Is there some way to work around this?


Please don't tell me to install SQL server on four different servers instead :)

//EDIT

The above string was incorrectly cut'n'pasted from the trace log,,here's the correct one.

declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,N'@P1 int,@P2 int,@P3 nvarchar(12),@P4 int,@P5 nvarchar(3258)',N'INSERT INTO VCI_SCANRESULTS_TARGETS (scanh_id, update_id, target_uid, target_status, oem_patch_info) VALUES (@P1, @P2, @P3, @P4, @P5)',165,854,N'vm-101',0,N'<Patches><Missing><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934458-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934459-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934458-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934459-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934458-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934459-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934458-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934459-x86-ENU.exe</PatchKey></Patch></Missing><Installed></Installed></Patches>'
select @p1

//EDIT

Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 8:27 AM
in response to: jobo
Click to view rossiauj's profile Novice rossiauj 18 posts since
Mar 27, 2006

Hi,

The total command is longer than 1000 characters, indeed, but its the string that is inserted that must not exceed 1000 characters.

The string itself is a mere 656 characters long:

SP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934458-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934459-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934458-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934459-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934458-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934459-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934458-x86-ENU.exeSP2SQL Server 2005 Workgroup Edition0409MSWU-161SQLServer2005-KB934459-x86-ENU.exe

You could remove this update from the baseline and see what happens. It could well be the culprit. I notice it gives two times the number of instances.

You are sure this was the last INSERT INTO VCI_SCANRESULTS_TARGETS?

Greetings,

Jos Rossiau

Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 1:00 PM
in response to: rossiauj
Click to view jobo's profile Novice jobo 10 posts since
Jun 3, 2005

I'm really sorry, I got the wrong entry in the clipboard when I did cut and paste, here's the correct one.

declare @p1 int
set @p1=NULL
exec sp_prepexec @p1 output,N'@P1 int,@P2 int,@P3 nvarchar(12),@P4 int,@P5 nvarchar(3258)',N'INSERT INTO VCI_SCANRESULTS_TARGETS (scanh_id, update_id, target_uid, target_status, oem_patch_info) VALUES (@P1, @P2, @P3, @P4, @P5)',165,854,N'vm-101',0,N'<Patches><Missing><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934458-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934459-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934458-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934459-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934458-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934459-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934458-x86-ENU.exe</PatchKey></Patch><Patch><SP>SP2</SP><Product>SQL Server 2005 Workgroup Edition</Product><LanguageID>0409</LanguageID><BulletinID>MSWU-161</BulletinID><PatchKey>SQLServer2005-KB934459-x86-ENU.exe</PatchKey></Patch></Missing><Installed></Installed></Patches>'
select @p1

Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 1:18 PM
in response to: rossiauj
Click to view jobo's profile Novice jobo 10 posts since
Jun 3, 2005
I have no baseline attached anywhere so I guess there in no point in removeing the sql server patches?
Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 1:20 PM
in response to: jobo
Click to view rossiauj's profile Novice rossiauj 18 posts since
Mar 27, 2006

That's definitely the one, the patch itself is only 248 characters long, but that multiplied by 8 comes to over 1600 characters. Which will never fit into the OEM_PATCH_INFO varchar(1000) field.

I wonder why it wants to register twice the patch per instance, you are sure you only have 4 instances running?

I guess Shavlik (unless VMware itself is responsible for the design of the database) should perhaps consid making the OEM_PATCH_INFO field a little bit larger.

For now you should remove the update from the baseline and consider running the update manually.


Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 1:35 PM
in response to: jobo
Click to view rossiauj's profile Novice rossiauj 18 posts since
Mar 27, 2006

What's the use of scanning without a baseline, it does not give you any information about compliancy, does it?

You have to create a new baseline, or use one of the existing ones (critical or non-critical VM updates) and attach it to the object or its parent (not being a resource pool).

Then you can remove this particular update from the baseline and run the update. It now gives you a compliancy report about what patches are installed and what not.

I ran a scan on a object without baseline and it returned no information, just completed succesfully. If I choose remediate on that object, I can't continue, because there is no baseline attached to the object or its parent.


Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 1:45 PM
in response to: rossiauj
Click to view jobo's profile Novice jobo 10 posts since
Jun 3, 2005

I changed the database table VCI_SCANRESULTS_TARGETS collumn OEM_PATCH_INFO to allow varchar 3000

and now the scan works perfectly, for the moment :)

However, I guess this "dirty" hack is not supported by vmware but it sure is a problem that should be resolved in some way.

As this is our producion environment is doesn't feel quite rigth to do this kind of stuff to resolve errors. I hope there will be some official/supported solution to this problem.

And thank you Jos for your help!!

Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 2:02 PM
in response to: jobo
Click to view rossiauj's profile Novice rossiauj 18 posts since
Mar 27, 2006

The thought crossed my mind too, but I would not have suggested it to you because I wasn't sure it would not break the app or corrupt the database, maybe not now but when there is a patch or update.

I created a Support Request to address this issue, as I would think that with 3 instances you already have the problem, maybe they will fix it, or tell you it's ok to change the field's property.

You are welcome, glad I could be of help, usually it's the other way around here ;-)


Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Feb 8, 2008 2:20 PM
in response to: rossiauj
Click to view jobo's profile Novice jobo 10 posts since
Jun 3, 2005

I removed the baseline to eliminate the base line as a source of error :)

I do had a baseline and now It's attached again.

Reply Re: Upatemanager (vc2.5) There are errors during the scan operation Oct 16, 2008 3:36 PM
in response to: jobo
Click to view pomiwi's profile Enthusiast pomiwi 64 posts since
Sep 8, 2008
Just had the same issue resolved for myself... each VM which you are scanning MUST have a cd-rom drive. This is used to mount the images etc :) Hope this works for you.
Actions