"Relics" is the 4th episode of the sixth season and was written by Ronald D. Moore.
The Enterprise crew finds what they believe to be a "Dyson's sphere" and pick up a distress signal from a transport ship called the Jenolen that had crashed landed on the sphere. The away team finds the transporter in a continuous loop and that someone was trying to beam aboard. They beam up one person, Captain Scott.
We learn that the transporter had been rigged to save his and another passenger indefinitely until rescue arrived. That was 75 years ago!
The Enterprise welcomes their elderly guest, but Captain Scott, AKA Scotty, is not satisfied to sit on his duff. He wants to help in engineering but becomes a nuisance when he doesn't understand all the changes to the technology and Chief LaForge orders him out of engineering.
Disheartened, he wanders into Ten Forward and orders Scotch. He learns the hard way that he hates the synthetic version of the drink and gets angry. Commander Data shows up to ease his dismay with some real booze that Guinan keeps in stock for special occasions. Scotty likes the "green" and takes the bottle with him to the holodeck to sit on the bridge of the the first Enterprise, the one without the "bloody A, B, C, or D."
Captain Picard joins him on the "bridge" and they talk and Picard realizes that what Scott needs is to feel useful. He later recommends to Geordi that he take Scotty to the Jenolen to get it running and recover the data from the ship about the sphere. Now Scotty is in his element and they get the engines in working order.
Meanwhile, the Enterprise gets sucked into the sphere through a port by the gravity of the sun inside. During this, the Enterprise gets dangerously close to the sun which is cutting off communication from the Jenolen. The sphere is abandoned and tests on the sun show it's core is unstable, which may explain why the original inhabitants left. The crew discover the only way out is the same port where they came in. Scott and Geordi figure out that the Enterprise is trapped in the sphere and use the Jenolen shields as a means to keep the port doors open in time for the Enterprise to get through. And Scotty and Geordi are beamed aboard the Enterprise before the port doors collapse and destroy the Jenolen.
I liked this episode because of it's humor as Scotty gets used to life 75 years into the future and the connection between this crew and the original series. It was great seeing the chiefs of engineering of both old and new Enterprises working together to solve a crisis. It also shows how the federation has advanced in 75 years. Scotty has no intention of giving friendly gestures toward, or acknowledging, the current Enterprise Chief of Security, a Klingon.
One highlight from the show is when Data explains to Scotty that they serve synthahol (replicated alcohol without the side effects) on Starships now. Scotty says to Data, "You're not exactly human, are you?" Data tells him he's an android and Scotty's response is: "(sigh) Synthetic Scotch, synthetic commanders."