I would use sentence 2. Sentence 1 looks as if the ad was for "an Officer on JobsDB", as if that were the job title. That's not the case.
I would not use "job posting".
In response to your advert on JobsDB for an Officer (ref: JFF 000222), I attach my CV and covering letter for your consideration.