Ramirez, 34, spent the first eight seasons of his major-league career with the Chicago White Sox, who signed him as an amateur free agent in 2008. In 154 games last season, he batted .249/.285/.357 with 10 homers, 62 RBI and 17 stolen bases. Ramirez is a career .273 hitter who has one All-Star appearance and two Silver Slugger Awards.
Alexi Amarista started 118 games at shortstop for the Padres last season, hitting just .204 with three homers, 30 RBI and five stolen bases.
San Diego also had been linked to free-agent shortstop Ian Desmond, who has spent the first seven seasons of his major-league career with the Washington Nationals.