You are viewing limited content. For full access, please sign in.

Question

Question

Manually setting LFDS sync time in LFDS database?

asked on September 5, 2020 Show version history

Hello,

Wondering if anyone has attempted to manually update the LFDS database (db_settings table and ADGSLastPollTime name value in a row) to force sync at a specific time. We are on 10.2 and when I look to see the value is 132437573498697196 (which should have been about 2am this morning).

 

It would be great to be able to decipher this to know how we can force LFDS to sync at a specific time daily since syncing typically locks up our forms app due to the high volume of AD entries we have. We simply cannot have the AD syncing going on while users are trying to use the system.

 

For now we just delete that record and restart LFDS service at 1am to force it to re-sync. Would prefer just to be able to update that table/value so we don't have to restart LFDS each night.

 

Thanks,

Julie

0 0

Answer

SELECTED ANSWER
replied on September 8, 2020

There may be a query that can convert from datetime to filetime for you but other than that you would need to write a script or program to figure out the right filetime value to use. My apologies for the lack of a good workaround on the older versions of LFDS.

1 0

Replies

replied on September 8, 2020

Hi Julie,

For this, I recommend upgrading to LFDS 10.4.3 or above, as we implemented AD Group Sync scheduling options that allow running at specific times/days (see below image).

0 0
replied on September 8, 2020

Hi Chase,

Thanks, although I am aware that 10.4 allows you do set the exact sync day/time; but we aren't in a position where we can upgrade soon. So I was just wondering if there's a way I can utilize the db_settings table in the interim.

Thanks,

Julie

0 0
replied on September 8, 2020

Ah I see. In that case, you should be able to continue deleting the value for ADGSLastPollTime (that number is the last time the sync ran in UTC Windows File Time) and just forgo the service restart. LFDS polls this hourly so a sync should be initiated within one hour of deleting the value from the table.

0 0
replied on September 8, 2020

Interesting ok. Yeah I am aware we can just keep deleting the record. I was really hoping someone could shed light on how I could force a specific time as the value in that db_setting record.

Thanks,

Julie

0 0
replied on September 8, 2020 Show version history

That value is the last time the sync was run; with the old interval scheduler LFDS checks hourly to see if (CurrentTime) - (ADGSLastPollTime) > (DesiredInterval). There is no way to use that value to specify a schedule. What I meant by my prior comment is that you can continue to use your current process but a service restart is unnecessary. You will just have less control over when the sync happens (it may happen up to an hour after the value is deleted).

0 0
replied on September 8, 2020 Show version history

Right ok - my thinking was that if I could force a value in that ADGSLastPollTime that will make Laserfiche think a sync has taken place at a certain date/time so it won't try again for 24 hours past that (our desired interval is every 24 hours). I was hoping there was a way to decipher the format of that value ADGSLastPollTime; but it sounds like you are saying that is not possible.

0 0
replied on September 8, 2020 Show version history

The format of ADGSLastPollTime is Windows file time in UTC. For example, run 

get-date 132437573498697196

in Powershell and it will return "Saturday, September 5, 0420 5:29:09 AM" (add 1600 years for the current year). If you wanted, you could set that value to some time in the future to delay the sync, but I'm unsure how that would help your situation. Even if you get a sync to run exactly at your desired time and use a 24 hour interval, the syncs will drift later and later over time due to ADGSLastPollTime being set at sync completion, not start. This would necessitate rolling back the last poll time via DB editing anyway.

0 0
replied on September 8, 2020

Ah ok - I guess there's no way to use that format in SQL Server easily? It would be helpful in the case where the sync is delayed (due to network or whatever issues may have delayed a sync) and we want to make it think it doesn't need to sync so it doesn't sync during business hours on us. 

 

For now I guess we'll just keep doing what we've been doing, which is disabling syncing for the day in LFDS if we start having system issues due to a delayed syncing.

 

Thanks,

Julie

0 0
SELECTED ANSWER
replied on September 8, 2020

There may be a query that can convert from datetime to filetime for you but other than that you would need to write a script or program to figure out the right filetime value to use. My apologies for the lack of a good workaround on the older versions of LFDS.

1 0
replied on September 8, 2020

Thanks Chase.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.