I currently have window 2003 and epo 4.5. I want to build a window 2012 server and install epo 5.0. can i migrate my epo setting and sql db to that new window 2012 server?
If so will i loss any configurations.
Not in one go, no.
ePO 4.5 won't run on Windows 2012 and ePO 5.0 won't run on Windows 2003 but you should be able to do it in steps and preserve the configuration.
Both ePO versions run on Windows 2008 R2 (64-bit) for example.
There may be easier ways I guess but you could:
Upgrade to ePO 4.6.6 on W2K3
Backup and migrate this to W2K8R2 (See McAfee support article: KB71078 - How to migrate ePO 4.5 or ePO 4.6 from a 32-bit system to a 64-bit system)
Upgrade to ePO 5.0 (Per the ePO 5.0 install guide)
Backup again and migrate to Windows2012 (Now you can use the new ePO 5.0 integrated disaster recovery features).
Don't try to upgrade OS and ePO version at the same time, that will very likely fail.