Sri Lanka have 64 overs including a minimum of 15 in the final hour to score 102 more runs and take a 1-0 lead in the three-match series, after the first Test ended in a draw in Abu Dhabi last week.
But the weather in Dubai was cloudy and rain was forecast for later Sunday.
At the break openers Dimuth Karunaratne (18) and Kaushal Silva (14) were at the crease.
Pakistan's lowest defended target was 127 achieved against New Zealand at Hamilton in 1993, when they dismissed their opponents for 93.
More From This Section
Earlier, Sri Lankan paceman Suranga Lakmal finished with a career best 4-78 as Pakistan lost their last three wickets for 29 runs to be bowled out for 359.
Lakmal removed Sarfraz Ahmed in the fourth over of the day, bringing one in sharply to beat the Pakistani's forward defensive push and hit the off-stump. Sarfraz scored 74, batting for 211 minutes and hitting seven boundaries in a fighting innings that took the game to the final day.
Lakmal then had Rahat Ali caught behind for eight, for Prasanna Jayawardene's ninth catch in the match. Prasanna equalled Sri Lanka's record of nine catches by a wicketkeeper in a match set twice in successive Tests by Amal Silva against India at home in 1985.
Nuwan Pradeep, Shaminda Eranga and Rangana Herath took two wickets apiece. The third and final Test starts in Sharjah on Thursday.