When you try to deploy Visual webpart using Visual studio 2010 you will get following error on deployment :Error occured in deployment step: “Recycle IIS application pool”: The local sharepoint server is not available. Check that the server is running and connected to the sharepoint farm.
Cause:-
The account you are running Visual Studio does not have sufficient permission in SQL server database
Solution:-
Make the account you are running Visual Studio a member of the db_owner role on the sharepoint_config and sharepoint_admin databases.
Image may be NSFW.
Clik here to view.

Clik here to view.
