There is no grounding wire common to both transformer and
building (unless transformer is part of the building).
Utility transformer has its earth ground. The building must
have its own single point earth ground. Wire does connect
that transformer earth ground to building earth ground - the
neutral wire. But wire is an electrical component. Those
grounds - transformer and building - are electrically
different even though they share opposite ends of the same
neutral wire. This electrical difference is why something
called ground loops exist and why each earth ground is a
single point ground.
Implied by what was posted - the UPS is a building wide
system. Therefore the UPS must have its own dedicated
connection to building's single point earth ground. No earth
ground means effective surge protection provided by a building
wide UPS systems would not be effective. That UPS earth
ground can be wired per NEC to breaker box. But that would
compromise the UPS protection which requires a typically 'less
than 10 foot' connection, short, direct, and independent to
earth ground. Requirements that exceed what NEC demands. NEC
requirements are only for human safety. Transistor safety
requires additional considerations beyond what NEC requires;
especially the concept of single point earthing.
Breaker box ground is where utility neutral, household
circuit neutrals (white wires), safety grounds (green or bare
wires), and earth ground wires all typically join. However
that does not mean receptacle safety grounds (connected to
that breaker box) are earth grounded. UPS connected to
breaker box for power might also require a dedicated
connection from UPS direct to earth ground. Distance from UPS
via breaker box to earth ground would typically be too far.
Distance from UPS to earth ground and how that wire is routed
has special requirements beyond what NEC requires.
Notice the difference. Receptacles have a safety ground.
But incoming telephone and CATV must connect to earth ground -
not to safety ground. Even though breaker box does connect to
earth ground, the telephone and CATV must connect to the earth
ground side of that wire; not to breaker box. Yes, receptacle
safety ground, building earth ground, breaker box ground,
transformer earth ground, computer chassis ground, and
computer motherboard ground are interconnected. But each
ground is electrically unique. In this interconnected
circuit, a new ground connection is defined by the purpose of
that ground.
From a building wide perspective, this is what the earth
ground system should look like:
http://www.erico.com/public/library/fep/technotes/tncr002.pdf
or page 14 of
http://www.leminstruments.com/pdf/LEGP.pdf or
http://leminstruments.com/grounding_tutorial/html/index.shtml
[section entitled "Measuring Ground Resistance at Cellular
Sites,Microwave and Radio Towers"]
Another example demonstrating single point earth ground
verse multiple wires entering (and earthed) at different
locations:
http://www.cinergy.com/surge/ttip08.htm
That is the earth ground system. How the AC electric safety
ground connects to the earth ground system is demonstrated in
pictures at:
http://www.pueblo.gsa.gov/cic_text/housing/surge/contractors.htm
Notice that the PC in Figure 1 suffers surge damage if the
phone line on right is far from AC electric on left. Figure 2
also demonstrates how earth ground from all three utilities -
AC electric, CATV, and phone - are best installed to be less
than 10 foot and connected to a single point earth ground.
IOW AC electric safety ground and AC electric neutral wires
connect from breaker box to earth ground via the one earthing
wire that exceeds what NEC requires. Examples: less than 10
feet, no splices, no sharp bends, not inside metallic conduit,
and routed separate from non-earthing wires.
Again, the idea is to earth for both human safety (NEC
requirements) AND for transistor safety. The concepts were
discussed in those above two discussion in misc.rural .