General Sir Nick Parker, in charge of the military's Olympics role, said the security exercise would prepare for the possibility of "extreme threats".
– General Sir Nick Parker
What we need to do is make sure we practise against those high-end threats but they are not considered to be likely.
What I'm doing is testing my systems so I'm reassured that, should they become more likely, we can react.
One would want the world to know that we are taking security for the Olympics seriously.
HMS Ocean was successfully negotiated through the Thames Barrier, before beginning a 180-degree turn at West India Docks. She arrived at Greenwich at around midday.
Captain Andrew Betton described the task of guiding her through gaps of just 60 metres as "challenging".
Smaller crafts and patrol boats accompanied the ship as part of the maritime security plan.
Watch close-up footage of HMS Ocean as it passes through the Thames Barrier, ahead of a major security exercise in preparation for the London 2012 Olympic Games.
Soldiers have taken to the rooftops of residential areas in London, as part of the capital's security training exercise ahead of the Olympics.
Lieutenant Mike Robertson from 661 Squadron, who will fly Army Lynx helicopters from HMS Ocean, said there were "a huge number of threats" that the military could face. His unit returned from Afghanistan five months ago, and he described the transition to protecting London as "very challenging".
Lt Robertson added: "I'm very excited as are all the squadron to be part of the Olympic Games."It's a once in a lifetime opportunity to be part of the greatest show on Earth, especially in your home country."
During the Games the ship will also accommodate 300 military personnel who are providing security at nearby Greenwich Park, and engage with Londoners by hosting public visits. Last year it spent four months operating off the Libyan coast.
Captain Andrew Betton said the ship would focus on air security over the weekend, with river operations taking place between Tuesday and Thursday next week.
"That will stretch all elements of Ocean's contribution to the security plan, and then I hope assure the security organisation that we are ready to provide the envelope required for the Olympic Games themselves," he said. Capt Betton said the ship would help stop any potential threats on the river.
"The versatility and manoeuvrability of helicopters allows them to get to the scene of action very swiftly to identify and to divert any surface vessels that are heading up the Thames, to ascertain their intentions and if necessary take action," he added.
HMS Ocean travels through the Thames Barrier on its way to a Olympic Games security exercise.
HMS Ocean travels up Thames ahead of a security exercise in preparation for the Olympic Games.
HMS Ocean's security exercise in preparation for the Olympic Games is the final phase of the operation named Olympic Guardian, which began earlier this week in Weymouth and in the airspace over the capital. The ship will act as a launch pad for helicopters and a base for Royal Marine snipers.
Smaller crafts and patrol boats will accompany the ship as part of the maritime security plan. The snipers have extensive experience of shooting the engines of fast vessels in the Royal Navy's fight against the drug trade in the Caribbean.
Ocean will travel up the Thames before attempting a complicated 180-degree turn as it reaches its destination. The warship is 38 metres wide, and Captain Andrew Betton will carefully guide it through "challenging" gaps of just 60 metres.