The answer to this question depends on which iteration of the Arrowverse you're referring to.
Arrow (TV Series)
In the original Arrow TV series, Oliver Queen did not know that Sara Lance was alive until the Season 3 finale. He believed her to be dead after the Queen's Gambit incident in Season 1. Sara's return was a major plot point in Season 3, and her survival was revealed to Oliver through a series of clues and flashbacks.
Legends of Tomorrow (TV Series)
In Legends of Tomorrow, Sara Lance is alive and well as the captain of the Waverider. She is a central character in the series, and her relationship with Oliver Queen is explored in flashbacks and crossovers with Arrow.
Conclusion:
Therefore, whether Oliver knew Sara was alive depends on which show or storyline you're referring to. He was unaware of her survival in the original Arrow series but was aware in Legends of Tomorrow.