Here you go.
Now it doesn't exactly stop there, the episode is titled Future Imperfect. Riker wakes up in sick bay and has amnesia, has lost all his memory for the last 16 years. But wait..... Suffice to say I think our Magician might be interested in getting himself a holodeck one day.
p.s. and yet I guess I have to admit, laying off Aunt Ruth and replacing her with a machine would seem pretty cruel actually. so nevermind about all that.