9V pin is only 5V

The 9V pin isn't labelled very well - it should just be whatever you're supplying via the power jack. You might need to switch the power jumper to external from USB for it to work. You can't control the 9V from your sketch. To control a relay, you'll need some extra circuitry (like a transistor) on one of the digital pins.