For the second night in a row, the Pittsburgh Pirates had no concerns about how they would replace the missing bats from their lineup.

After rallying from a four-run deficit 24 hours earlier, the Pirates coasted from start to finish, beating the Athletics, 12-4, at Sutter Health Park in Sacramento, Calif.

Ryan O’Hearn set a career high with six RBIs, and all nine starters had at least one hit as the Pirates had no difficulty producing runs minus center fielder Oneil Cruz and rookie shortstop Konnor Griffin, who both are out with injuries.

O’Hearn went 3 for 5 with a two-run homer, two-run double and two-run single. He sliced the home run down the left-field line.

Entering the series finale against the A’s, O’Hearn had five RBIs in June, and he had just two in his previous 11 games.

“It’s going opposite field, honestly,” O’Hearn said on the FSN Pittsburgh postgame show. “The last couple weeks, I had been pulling a lot of balls. The past couple of days, I’ve been trying to get back to one of my strengths, which is hitting the ball to left field.”

With O’Hearn needing a triple to complete the cycle, manager Don Kelly replaced him with pinch-hitter Esmerlyn Valdez in the ninth. O’Hearn didn’t lobby for a chance to make history.

“No,” he said, laughing. “It would be tough for me to get a triple — in this ballpark, too. I’ve never hit for the cycle. Maybe one day.”

Given the location — the Athletics temporarily are playing in a Triple-A stadium before heading to Las Vegas — and the way the Pirates poured on runs Wednesday night, it looked like a baseball version of a West Coast offense

Marcell Ozuna had two hits, including a solo homer. Brandon Lowe and Bryan Reynolds each drove in two runs. Spencer Horwitz had two doubles, and Nick Gonzalez and Jared Triolo had two hits apiece.

“Up and down, we were really consistent in our approach,” Kelly said. “We did a really good job one through nine.”

Braxton Ashcraft (6-3) allowed one earned run and four hits in six innings for the win, the first by a Pirates starter since June 4. He struck out seven and walked three.

Ashcraft went at least six innings in each of his May starts, but he didn’t get past the fifth in his first two starts in June.

“Braxton looked like he was back to what he was doing before,” Kelly said. “He was throwing strikes, mixing in the curveball and slider and a couple changeups. He was efficient.”

Athletics starter Aaron Civale (5-3) was chased one batter into the fourth inning having retired just nine of the 20 batters he faced. The Pirates had nine hits and walked twice while Civale was in the game. He was charged with six earned runs.

The Athletics activated Civale from the injured list to start for the first time since May 25. Civale had been sidelined with right shoulder tendinitis, and it didn’t take long to realize he wasn’t at his best.

The Pirates scored three runs in the first as Civale gave up three doubles and a walk to the first four batters.

Horwitz opened the game with a sharp double to right. Lowe walked. Reynolds, on the heels of a 4-for-5, two-homer performance, launched a pitch to deep right field. It had the makings of a three-run homer until the wind knocked down the ball. Right fielder Lawrence Butler was fooled by the trajectory of the ball, and it landed next to him and bounced into the bullpen for an RBI double. O’Hearn followed with a two-run double to left, and Civale still was searching for his first out.

Civale got out of the inning without incurring further damage, but he wasn’t as fortunate in the second. Four of the first five batters hit safely, with Horwitz hitting another double, and Lowe and Reynolds following with RBI singles.

“It makes pitching a lot easier,” Ashcraft said about the 5-0 lead. “It makes being comfortable and being in the zone really easy. It makes throwing heaters in the zone really easy, and everything plays off that.”

Ashcraft didn’t allow his first hit until the fourth and took a one-hit shutout into the sixth.

After striking out twice, Nick Kurtz hit a single to left. A walk to Shea Langeliers gave the Athletics their first runner in scoring position. Tyler Soderstrom grounded to first. Horwitz stepped on the base, then threw to second. Triolo applied the tag, but the ball was dislodged from his glove for an error.

Jacob Wilson pulled the Athletics within 7-2 when he delivered a two-run single to center field.

Ashcraft finished his night with back-to-back strikeouts, and the Pirates put the outcome out of reach in the seventh when they scored five times.

Ozuna led off the inning with his first home run since May 15. The start for Ozuna was his first in six days and just the fifth in the past 18 games. With the Pirates missing two starting position players, they need more contributions like that from Ozuna, signed in free agency to replace Andrew McCutchen as the team’s primary designated hitter.

“Ozuna is such a great teammate; he really is,” O’Hearn said. “He brings great energy. He pulls for every guy on the team. He’s infectious.”

After yielding the homer, Scott Barlow gave up a single and hit two batters to load the bases.

Luis Medina replaced Barlow and walked Horwitz to force in a run. Lowe hit a sacrifice fly to hike the lead to 10-2. One out later, Horwitz singled to center, driving in two more runs.