The best case is when you can connect the scope normally. Floating the scope is certainly the last thing you want to do. You are potentially putting line voltage on the case of the scope and bad things can start happening very quickly, up to and including death.
Generally speaking, I will look at the wiring diagram and decide where the grounded conductor is and ground the scope there if I absolutely need to but for most things, the small amount of ripple you see if you do not ground the scope to the circuit under test will not affect your measurement.
It is still tied to the ground via the plug.
If you need to null out the voltage drop on the neutral, hook channel 2 to the neutral, set it to invert and add, then probe with channel 1.
If you are looking at something on the load side of a transformer (not autotransformer) you should be able to ground the scope normally. You can ground the scope to the circuit through a light bulb if you are not sure what you are dealing with, voltage wise. If it lights, you are going to have to reconsider what you are doing.
Be sure you have the right probes and ground clips if you are looking at line voltage. It is really not something I like to do unless I have to.
It is best to learn your scope technique with a transformer isolated circuit, preferably at low voltages, like a doorbell transformer or a wall wart.
When I was playing around with dimmers, I found out the scope pictures on the load side of a doorbell transformer was virtually identical to the line side.