I'm particularly interested in records for the Indiana-class pre-dreadnought battleship named USS Massachusetts (BB-2). Can this information be found online?
From Cornell University's compilation of the 1896-1900 Register of the Navy of the United States on page 446, corresponding to page 110 of the January 1, 1898 Register.
On page 131 of the same register we find the squadron assignment of all the U.S. Navy First Rates including Massachusetts:
and is likewise found in the preceding year's (to January 1, 1897) register,
commanded by Captain Frederick Rogers, as part of the North Atlantic Squadron.
Conceivably you could do it the hard way by starting with the Register of Commissioned and Warrant Officer in 1897 (yes, I know, Massachusetts was commissioned in 1896, but after the register for that year was published) and check the entries on the captains’ list, for the most part, since battleships are usually commanded by captains, every year until 1919. A sample, let’s see:
1897 – Captain Frederick Rogers, from 10 June 1896
1898 – Captain Francis J Higginson, from 22 July 1897
Until decommissioning in 1906
. . .
After recommissioning in 1910 as a midshipman training ship
1911 – Commander Carlo Bonaparte Brittain, from 10 October 1910
. . .
1919 – Captain John Drayton Wainwright, from 11 April 1917
Massachusetts final decommissioning was in 1919 & she was scuttled in 1921 off Pensacola after serving as a target for coast defense batteries at Fort Pickens.
Registers are available in various places and formats, for example, here: http://www.ibiblio.org/hyperwar/AMH/USN/Naval_Registers/
What ever you do, don’t pay for one.
Added later, you might also want to look at: http://www.navsource.org/archives/01/02a.htm scroll to the bottom.
In the worst case scenario, there are professors in big universities that may know such information. If you can get a call in, you can call the NAVY
All hail the USS Roosevelt. It's my favorite schooner. :P