The Battle of Denerim is the final quest line in Dragon Age: Origins.
After the Landsmeet finishes, The Warden must return to Redcliffe to face the Darkspawn attack. When the Warden arrives in Redcliffe, the village is already overrun and the castle is under siege. You must help the garrison fight off the Darkspawn including an Ogre.
Once the Darkspawn have been defeated, talk to the Redcliffe officer to enter the castle and speak with Arl Eamon. Apparently the main body of the Darkspawn horde has started marching to Denerim. The Warden and the Arl must gather the troops and march to meet the horde. The battle at the Castle gates is a little challenging, you face a large amount of Hurlocks, and at the end of the assault, a Ogre Alpha comes out. The Alpha can and will destroy any remaining guards and unprotected Archer or Mage companions if not slain.
You can also speak to Eamon again after his speech. Also try talking to one of his bodyguards about the upcoming battle, and some of your army commanders who may be gathered nearby.
When you're done in the great hall, do some last minute shopping in the corridor with your camp merchants and head upstairs to talk to Riordan. After speaking to Riordan, return to your room to find Morrigan who requires you to make an important decision (see Morrigan's Ritual for more information). No matter the choice you make, Morrigan will leave your party either now or at the end of the final battle.
Denerim City GatesAfter the armies of Ferelden push through the gates and into the city of Denerim, the Darkspawn will start putting up a firm defense to halt any advances - seemingly knowing that they have Ferelden outnumbered. At this early stage you will come across group upon group of Darkspawn Grunts and a couple of Alphas which pose no real threat as everyone you have collected (party) will be involved in the battle alongside Human soldiers and Riordan. After you clear out the waves of Darkspawn in the area talk to Riordan who will advise you to take Alistair or Loghain* and two other party members with you, he will also tell you about the Darkspawn Generals and where he is planning to lure the Archdemon - specifically Fort Drakon. After forming your party, you will have a chance to watch a very touching moment with the party members as they wish you luck among other things. But before this, you will chose the commander to lead the forces at the gates. After that make your run down the street with the cheering of soldiers along the way.
Note: Equip the best equipment you have on your party members, its going to help.
*Note: It is not required that you bring Alistair or Loghain with you, Riordan just advises it.
There will be another side quest later, after you complete the Alienage quest as you are making your way to Fort Drakon. The Companions you have left behind will be asked to defend the City gates from another series of waves of Darkspawn. Morrigan will have left the party by then (if you had not taken her with you against the archdemon) . The quest is rather straightforward and should pose no large threat to your companions, who can magically draw on your party inventory of potions, poisons, etc.. Make sure your inventory has enough healing potions for your "B party" to use, if you have taken Wynne with you to face the Archdemon.
Denerim Market District
Upon entering the Market District you should make use of the armies at your command - particularly the Dwarves, Golems, Werewolves, or Mages at this point as they are all good for taking on the enemies in the area. MANY of the enemies here are Ogres, so keep potions, and allies closer. The enemies you will be facing are Ogres, Genlock Emissaries and one of the two Hurlock Generals (the melee one), there is no set limit of enemies in the area and the Ogres and Genlocks will spawn at regular intervals from the other map exit up until the General is defeated. Taking out the Hurlock General isn't a tough ordeal, just make sure to have dealt with any wave of enemies before taking him on so that you can have his undivided attention and the support of the armies. Simply hammer down on him and attempt to stun him whenever possible or be prepared to pop a few health pots every two hits or so - because he is a heavy hitter. After defeating the General loot him for some nice items (The helmet 'Corruption' is among them) and then move on to the next area which will be The Alienage or the Palace District.
The other Hurlock General is in this area, attacking a barricade that the Elves have erected. Once inside the Alienage, talk to Shianni, she will join the attack if successfully persuaded. It will be easier to persuade Shianni to assist you if you are a City Elf. Dwarves are a good support team for this battle as despite having the entire Alienage to fight in, you will be in relatively close quarters when fighting the horde here. The Elves can also prove useful if your party is up to the task of holding the Darkspawn at the gate and within range of their arrows. Also, a mage can freeze the ogre and/or use spells such as fireball or blizzard to do area effect damage that will take out the grunts and injure the general. Taking out the ogre and the grunts also allows every unit to focus on the general once the gates are broken. If the ogre is killed too early (before the gate comes down), another one will come. Note: On PS3, the Ogre does not immediately die; it will remain at one health until the gates are down.
Once the area is clear, talk to Shianni again to complete the quest and receive a reward. As the party heads over the bridge out of the Alienage, the Archdemon appears and destroys the bridge behind them. Exit the Alienage and head to the Palace District
Denerim Palace District
Upon arriving, begin making your way towards the palace. Darkspawn are positioned on both staircases, championed by Ogres. Fight through them, and once the battle is over, you can enter Fort Drakon. Mages are a good support at this stage in the Final Onslaught as they can keep their distance from the horde while still providing excellent support.
While trying to enter Fort Drakon, you encounter the stairs up, and several darkspawn. Each stair has a number of Genlock archers & one Ogre.
If you use the provided cover by sneaking under them close to the wall, you can blast them all with area spells undetected.
Fort Drakon - First Floor
The Entrance to the fort is heavily guarded. Fight the hordes and enter the fort itself. One battle to note is with a Genlock Conjurer in the large room with 4 Ballistas. He will regularly teleport around the room, so a good option is to dedicate a range attacker to fighting him and let everyone else deal with the Shrieks he conjures, as the ranged attacker will automatically follow his movements without having to chase him around. Once you have dealt with the darkspawn on this level and are ready to advance upstairs, you will eventually come across Sandal. He is available to enchant weapons, as well as sell supplies to you one last time before you ascend further up the fort. Once finished shopping, head to the second floor.
Fort Drakon - Second Floor
The Second Floor is smaller than the first floor, but the enemies provide greater opposition. Head south, until you are confronted in a room by a Hurlock Emissary and two Ogres. Once those are defeated, search the crates in the room for useful potions. When you are ready, ascend to the rooftop for the Final Battle.