I live near Pendennis Caslte, one of the artillery forts commissioned by Henry VIII to protect from invasion and one of the things I've noticed is that it overlooks a heck of a lot of water.
It struck me then that it would be rather difficult to hit a ship at such long range, especially using a ball projectile.
To follow up, assuming the balls did actually hit, was this actually going to be enough?
Cannon of this period could not be called particularly accurate, but they were accurate enough to be effective. Remember that the English fleet was still able to engage the Spanish Armada from relatively long range, causing appreciable damage. And the inaccuracy induced by the movement of a ship's deck was a much greater consideration than the imprecision of the barrel and powder itself. So given equivalent skill, shore-based artillery was more accurate.
Also bear in mind that black powder coastal batteries were not meant to command the entire coastline, but only to protect certain harbors and headlands. The purpose of the cannon at Pendennis was to prevent hostile warships from gaining access to Carrick Roads and the port of Falmouth. To do so, they had only to deter ships from approaching within half a mile, which is generally within effective range and far less than the maximum range of the guns in question. (The harbor entrance is a mile wide, and the artillery fort at Mawes Castle covered the eastern half of the bay.)
Hitting a ship's hull at anything less than point blank range (200-300 yards where the gun did not need to be elevated) was usually a question of volume of fire. However, to effect a landing or to attack moored shipping, a hostile fleet would need to remain under the guns for a long period of time, meanwhile at the mercy of the wind and constantly-changing tides. A few lucky hits to the rigging could be disabling, so in absence of critical damage, the attackers could be rendered helpless, likely to drift ashore and be captured. In other words, it wasn't the prospect of being hit that was a deterrent, it was the prospect of being forced to remain under fire for hours at a time, with fatal consequences for a loss of control of the ship.
Ultimately, iron balls are an incredibly poor means of sinking a ship. High velocity shot makes neat little holes in the hulls of ships, causing little structural damage. Shot tends to skip off the surface of the water, so it rarely creates serious leaks. Killing men, dismounting guns and taking down masts and yards if more the mark.
Now, if the shore batteries had a furnace capable of heating their shot, then a few guns could pose a mortal threat to an entire fleet. Ships destroyed in battle fell victim to fire and explosion, more often then flooding.