Normally when one changes the HDD, 1st remove the power supply & the battery. Then make sure you press the "On" button to discharge the Motherboard. If you have done these steps then you should be safe.
Once you have remove the old HDD and replaced with the new, making sure that HDD is firmly secure, then put back the battery & the mains supply and boot into the Bios. Reset the Bios back to factory or default. Once you have done this, then press F10 and save and boot to the cd that either Sony gave to you or that you would have made yourself. These are whats called the recovery DVD's. Most Sony lap top's come with 3.
Best of luck!!