Sangakkara started confidently and drove Ajmal to midwicket boundary in his unbeaten knock as both batsmen have put on 33 runs before the break.
Pakistan brought in left-arm spinner Abdul Rehman in place of injured Bilawal Bhatti while fast bowler Talha got his second test after nearly five years, replacing Rahat Ali.
Talha played his only previous test against Sri Lanka in 2009 at Lahore during which gunmen attacked on visitors' team bus and killed six police officials and a van driver.
Pakistan also dropped
Mohammad Hafeez, who scored only one half century in four innings, and brought in Azhar Ali for his first match of the series.
Hafeez forced his way back into the test team after scoring three centuries in Pakistan's 3-2 win in the one-day series against Sri Lanka last month.
However, he struggled against the new ball in test matches and could score only one good knock of unbeaten 80 in the drawn first test at Abu Dhabi.
Sri Lanka awarded test cap to 31-year-old
Dilruwan Perera, who replaced fast bowler
Nuwan Pradeep.