<div dir="ltr">Thanks for info, that would come in handy in one of my other database table resources,<div><br></div><div>this specific error was mine, I set the livesync task to 30secs not taking into account the time it takes to run the scripts/etc... so by the time it would update the different databases the sql trigger to update the modified date would fire after what the new token would be so it kept syncing the same data thinking it was changed, i might have said that in reverse but my brain right now is scrambled from looking at logs..</div><div><br></div><div>Changed sync task to every 180 secs instead of 30 secs and it is working just fine now.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">JASON</div></div></div>
<br><div class="gmail_quote">On Wed, Jan 25, 2017 at 10:55 AM, Pálos Gustáv <span dir="ltr"><<a href="mailto:gustav.palos@evolveum.com" target="_blank">gustav.palos@evolveum.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jason,<div><br></div><div>In one of my customer I use for this "timestamp" in MS SQL VIEW and calculated with this:</div><div>DATEDIFF(SECOND, CONVERT(DATETIME, '1970-01-01', 102), LastChange) as LastChangeTimestamp<br><div class="gmail_extra"><br></div><div class="gmail_extra">Best regards,</div><div class="gmail_extra"><br></div><div class="gmail_extra">Gustav</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2017-01-25 17:35 GMT+01:00 Jason Everling <span dir="ltr"><<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5"><div dir="ltr"><div>When using livesync for scriptedsql conntector and database is ms sql server how should the modified column be formatted.</div><div><br></div><div>Right now I setup the 'modified' column with a trigger on insert/update to populate using GETDATE() which populates like 2017-01-25 10:32:02.107</div><div><br></div><div>Within the livesync task it seems to be updating rows with every sync task and I am assuming it is because of the date/time format.</div><div><br></div><div>My script looks like this basically, except mine has the right column names of course for the query</div><div><br></div><div><a href="https://github.com/Evolveum/midpoint/blob/d8aec0b6ae5c03009a2a703533f1637852a3b8ad/samples/resources/scriptedsql/SyncScript.groovy" target="_blank">https://github.com/Evolveum/mi<wbr>dpoint/blob/d8aec0b6ae5c03009a<wbr>2a703533f1637852a3b8ad/<wbr>samples/resources/scriptedsql/<wbr>SyncScript.groovy</a><br></div><br clear="all"><div><div class="m_6213483825572153824gmail-m_-7950524416919694454gmail_signature"><div dir="ltr">Any insights would be appreciated!</div><div dir="ltr"><br></div><div>Thanks!</div></div></div>
</div>
<br></div></div>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mail<wbr>man/listinfo/midpoint</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_6213483825572153824gmail_signature"><div dir="ltr"><div>Gustáv Pálos</div><div>Identity Engineer</div><a href="http://evolveum.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">evolveum.com</a><br></div></div>
</font></span></div></div></div>
<br>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>