It is correct to say that if your boat isn¹t hooked to AC at all or if the
batteries aren¹t grounded to the boat (not a good practice by the way) the
problem is reduced. But if you boat is wired and the AC and DC are grounded
with a safety ground, as they should be for your safety, this can be a
problem (even if your boat is connected to shore power with the proper cord
and it is wired correctly and you have a good battery charger). This is
called of stray current electrolysis. This has everything to do with the
marina and other boats in the marina and not necessarily what you are doing.
The culprit is a low voltage leaking from the AC on a problem boat or dock
and going through the AC safety ground on your boat and flowing through your
DC safety ground. More than likely the other boat isn¹t wired correctly or
using substandard equipment. Some marinas are ³hotter² than other also.
There are tons of articles on the internet and most electrical books about
this. As Wilhelm said, the problem is minor if you are not connected to AC
at all -- you are not providing any continuity for the stray current to
flow through.
Personally I used a diode isolator (often called a Galvanic Isolator) on my
ground lead on my boat to help with the problem. This isolates my DC ground
from the AC side of the house. They are easy to install. If you want to be
even safer use an isolation transformer, but these are heavy and expensive.
The little isolators cost a one to two hundred bucks in the US, but if a
person is handy with electricity, the parts can be obtained for a few bucks
and you can solder up your own. There are plenty of articles in many books
and on the internet about the problem and the fix.