[midPoint] ScriptedSQL livesync, date/time column format

Jason Everling jeverling at bshp.edu
Wed Jan 25 21:45:46 CET 2017


Thanks for info, that would come in handy in one of my other database table
resources,

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..

Changed sync task to every 180 secs instead of 30 secs and it is working
just fine now.

JASON

On Wed, Jan 25, 2017 at 10:55 AM, Pálos Gustáv <gustav.palos at evolveum.com>
wrote:

> Hi Jason,
>
> In one of my customer I use for this "timestamp" in MS SQL VIEW and
> calculated with this:
> DATEDIFF(SECOND, CONVERT(DATETIME, '1970-01-01', 102), LastChange) as
> LastChangeTimestamp
>
> Best regards,
>
> Gustav
>
>
> 2017-01-25 17:35 GMT+01:00 Jason Everling <jeverling at bshp.edu>:
>
>> When using livesync for scriptedsql conntector and database is ms sql
>> server how should the modified column be formatted.
>>
>> 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
>>
>> 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.
>>
>> My script looks like this basically, except mine has the right column
>> names of course for the query
>>
>> https://github.com/Evolveum/midpoint/blob/d8aec0b6ae5c03009a
>> 2a703533f1637852a3b8ad/samples/resources/scriptedsql/SyncScript.groovy
>>
>> Any insights would be appreciated!
>>
>> Thanks!
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>
>
> --
> Gustáv Pálos
> Identity Engineer
> evolveum.com
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170125/2583e69b/attachment.htm>


More information about the midPoint mailing list