prepared database access for sync status logging