Barcelona race winner Oliveira set the early pace on the factory KTM at the start of FP2, the Portuguese rider’s benchmark a 1m21.823s.
Marquez soon took over from Oliveira with a 1m21.687s, though this lap was set under yellow flag conditions when Avintia rookie Luca Marini crashed on the exit of the final corner.
This ultimately turned out to be of little consequence as Marquez hooked together a second session-topping lap on his Honda with a 1m21.656s.
Oliveira demoted him a moment later with a 1m21.496s, which stood as the time to beat until just under 20 minutes remaining.
Having aborted a lap set to put him back on top after a wild moment on the exit of the Turn 8 left-hander, Marquez had no such dramas on his following lap and returned to the top of the standings with a 1m21.291s.
Most of the field went into time attack mode in the closing moments of FP2, with Takaaki Nakagami on the LCR Honda the first to better Marquez’s lap with a 1m21.131s.
This only stood firm for around a minute as Fabio Quartararo – who worked on used medium rubber at the start of FP2 – on the works Yamaha took over with a 1m21.075s, though he too was quickly deposed by his team-mate Maverick Vinales, who found 0.078s on his lap.
Oliveira threw in a 1m20.690s with two minutes to go to return to the top of the order, and this would prove to be a time that would go unchallenged through to the chequered flag.
Quartararo held onto second ahead of Vinales, while Alex Rins impressed in fourth on the first of the Suzukis despite suffering a bit of pain in the right arm he broke two weeks ago in Barcelona.
Pol Espargaro had a second crash in FP2 at the Omega right-hander at Turn 3, but rebounded to fifth at the end ahead of Nakagami.
Aleix Espargaro was seventh on the Aprilia, with Johann Zarco top Ducati rider in eighth on his Pramac GP21 ahead of factory Ducati rider Jack Miller and Petronas SRT’s Franco Morbidelli.
Marquez was one of only a few not to fit a fresh soft tyre at the end of the session for a time attack and was 12th as a result with his earlier effort of 1m21.291s.
Marc Marquez, Repsol Honda Team
Photo by: Gold and Goose / Motorsport Images
He trailed a resurgent Danilo Petrucci in 11th, who is enjoying a better turn of speed in Germany courtesy of a new KTM chassis on his Tech3-run RC16.
World champion Joan Mir was a low-key 16th on the sister factory Suzuki, while Valentino Rossi was left in 21st after crashing his SRT Yamaha at the first corner late on.
Ducati’s Francesco Bagnaia was 1.5s off the pace on his factory Ducati in 22nd and last, though appeared not to fit a fresh soft tyre for a time attack at the end of the session.
Marini’s afternoon ended with a scary crash at the fast Turn 7 left, walking away unscathed but unable to improve on 18th having run as high as second at one point of the session.
MotoGP German GP – FP2 results