Jump to content
TonyPags

Issues trying to set Patching Stage via Script (or DB)

Recommended Posts

Posted (edited)

I'm struggling to build a working script that changes the patching stage on a device (test/pilot/production). This should be easy, like any EDF. ExtraData set value does not work. Looking deeper into the issue, the table with extrafielddata doesn't match device patching screens. So where is the data really stored?

You might be tempted to say, "ummm, Tony, all EDFs are in extrafielddata," to which I would reply "Yes Darren 😁   I already tried using the extradata set value function and selecting the patching stage item. That didn't seem to work. I can see the new record in the extrafielddata table, but this has no effect on the device patching screen....that still says the original value. Yes, I have force-updated the EDF views using call v_ExtraDataRefresh(1,'Computers'); which updates the v_extradatacomputers table. But this table has values for Patching Stage that don't jive with reality." 

Is there another spot it's stored? Are we sure there isn't another, newer field for this? I should have a lot more records in that table for this field that I do.

I tried running sql spy but that didn't yield anything helpful. 

I tried looking for a dataview that had patching stage so I could dissect it. No luck. Did I miss it? 

The only way I've been able to batch-change this setting is by shift-clicking devices under the PM GUI. Manually. With my MOUSE! The horror... 

Edited by TonyPags

Share this post


Link to post
Share on other sites
Posted (edited)

MySQL?  I am just running a check but perhaps this may help you:   SELECT Stage FROM computerpatchingstats WHERE ComputerId = '%computerid%'

 

I look for a '1' to indicate Pilot.  I believe 0 is test and 2 production but please verify.

Edited by tvarvais
add
  • Like 1

Share this post


Link to post
Share on other sites

Yes sir, this table grouped by stage looks like it matches reality. I just hope I can edit these values and it will work without any other changes. Since it's not an EDF value I should be careful here. 

To the lab... 

Share this post


Link to post
Share on other sites

Everything worked great, in tests. When it came time for LT script engine to run the query that changes the value, it fails.

I set the query to a variable and ran that while logging it, to ensure the query is what I expect, looks good, still fails. Pulling the query the script used from the log and running it in mysql worked fine. 

Any known issues doing this in the LT function? 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...