To resolve iPhone Error 9, first of all make sure that your computer has a USB 2.0 connector.
Next make sure that you've latest version of the iTunes.
A list of options will be displayed on your iPhone screen; from the viewed icons tap on General.
Now you will have to plug your device into the high power USB 2.0 port and then to your computer. For convenience try using the USB port on the back of the computer. Make sure you do not plug-in the device into a keyboard standalone hub or a display. Because a high power USB.20 is required on theses accessories a USB 1.x is offered with low power.
Do not connect any other device with your computer, only Apple USB should be connected with the Dock connector cable.
Next is to restart your device as well as your computer. You can restart your device holding the power button until it powers off. Then you will have to turn it back on by pressing the Sleep/Wake button.
From your USB connector disconnect your computer, do not disconnect the mouse and the keyboard.
Next you will have to reconnect the iOS device.
After the error 9 is resolved, again attach other USB devices and make sure you test the device after every connection.