This is a saying that defies a common origin.
The meaning is clear. It means to give “all” to achieve an objective.
The origin has been related to the following, (and this is not a complete list): -
1) The length of a machine gun ammunition belt was 9 yards. To give the enemy the “whole 9 yards” was to give him everything you had.
2) Material came in “bolts” of nine yards and was sold per yard. If a lady wanted a dress to be "exclusive", she would buy the “whole nine yards”.
3) Nine yards is also the amount of cement in a cement mixer, and then one would use the entire load.
4) Nine yards is the quantity of material one needs to make a Scottish kilt.
5) American football. To go the whole 9 yards means to be just short of where you should have been (Ironic)
6) Wedding veils. A wedding veil of the “whole 9 yards” would be impressive and show your standing.
7) Things nautical. A sailing ship had horizontal “yards” to which sails were attached. A sailing ship would have three masts with three yards. Ergo, running up all the sails would be giving 9 yards and going at top speed, under full sail.
8) The amount of material required to make a burial shroud.
The list goes on and on. There is no definitive answer. All the above have “loopholes” that negate validity.
To “go the whole hog”, “whole ball of wax” etc have the same connotation.
There is no sense getting into an argument with anybody on the origin of this one. He who professes to know, does not know, it is his opinion, and arguments based on opinion rather than fact, are destined to go nowhere.
Now, the Guru’s often trace the first time a saying was committed to print, as the time period of origin. The general consensus is that the saying originated in the United States around the 1960’s.
Having said that, the earliest documented “whole 9 yards” was this one, 31 March, 1855: -
Found at Wikipedia