After an extensive study at the Soong Foundation by a dedicated science team and Geordi La Forge, the group manage to unravel the Data matrix allowing for all of Data's memories, personality and experiences to override B-4. Through this, the android was able to help the Soong Foundation in upgrading the positronic brain and help in the recreation of the emotion chip originally developed by Doctor Soong. Ambassador Spock likened it to his resurrection a hundred and two years previously, though Data likened it more to a return. (ST comic: "Countdown, Number Two"; ST website: The Path to 2409)
By 2387, Data was active in Starfleet and had risen to the rank of Captain. Data assumed command of the Enterprise-E after the retirement of Captain Picard from Starfleet. (ST comics: "Countdown, Number One", "Countdown, Number Two")
In 2390, Jake Sisko came aboard the Enterprise for an interview with Data. Data gave his thoughts regarding future Borg attacks and whether Species 8472 had reached Federation space; the captain refused to discuss the events of his "recovery." It should be noted that in the transcript of the interview, Data uses a verbal contraction, whatever it may mean. (ST website: The Path to 2409)