Rory McKenzie got the only goal midway through the second half as Kilmarnock beat Ayr United 1-0 at Rugby Park.
A near 9,000 crowd saw Allan Johnston's men come out on top to book their place in Wednesday afternoon's draw for the third round of the Scottish League Cup.
Hibernian staged an incredible late comeback to beat Dumbarton 3-2 at Easter Road. Mitch Megginson and Mark Gilhaney struck early in the second half for Ian Murray's men but a Farid El Alagui double and a last-minute Sam Stanton goal sent Hibs through.
Hamilton Accies saw off Alloa 4-1 at New Douglas Park with goals from Tony Andreu, Martin Canning, Louis Longridge and Eamonn Brophy. Greig Spence scored for Barry Smith's team.
Dundee claimed a comprehensive 4-0 win over Raith Rovers at Dens Park thanks to goals from Greg Stewart, Paul McGinn, Peter MacDonald and Martin Boyle.
A Kris Doolan goal at the end of the first half was enough to give Partick Thistle a 1-0 victory over Morton at Firhill.
Ross Caldwell bagged a second-half double as St Mirren defeated Dunfermline 2-1 in Paisley after the Pars had gone in front early on through Lewis Spence.
Ross County overcame Stranraer 2-1 at Stair Park despite going behind to a Sean Winter goal after just three minutes. Melvin De Leeuw equalised and Liam Boyce grabbed the winner.
All the goals came in the first half at Ochilview as Hearts beat Stenhousemuir 2-1. Gary Oliver and Kevin McHattie netted for Robbie Neilson's men before Kieran Millar pulled one back.
Substitute Myles Hippolyte scored in the last minute of extra time as Livingston beat Queen of the South 1-0 at the Energy Assets Arena.
Falkirk and Cowdenbeath played out a 0-0 draw at The Falkirk Stadium, with the Bairns winning 4-3 on penalties after extra time.
A Kris Boyd double saw Rangers beat Queen's Park 2-1 in a delayed first-round tie at the Excelsior Stadium. Tony Quinn had the League 2 side level for a time but Boyd set up a second-round meeting with Inverness Caley Thistle at Ibrox.
The third-round draw takes place at Pittodrie on Wednesday at 1pm, with ties to be played on September 23/24.