Season 6 Episode 20 - Memento
The SG-1 team is onboard the Prometheus assisting in a test flight when it falls out of hyperdrive. They get to P3X-744, an unexplored planet that once had a Stargate on it but is now apparently inactive, but are forced to jettison the overloading drive which causes the natives to fire missiles. They convince the natives of the planet (Tagrea) to detonate the missiles and meet with them. The Tagreans are of mixed opinions and seem to have no knowledge of the Stargate or of their history past 300 years. Jonas and Teal'c find out the planet was enslaved by Horus and manage to find the location of the Stargate where it was buried. The Tagrean military commander, Calfas, moves in and takes them prisoner – Jack appeals to the councilman, Ashwin, who has Calfas arrested and frees the team, letting them use the Stargate to return home to get what they need to repower the Prometheus and establish diplomatic relations.