Access denied by business data connectivity

When you set up BCS with sql server  in Sharepoint , if you get error message like " Access denied by Business Connectivity"  Please check the permission in central admin as follows
  • Open the central Admin 
  • Navigate to Manage Service applications under Application Management
  • Select Business Data Connectivity Service
  • Select your external content type and Click on "Set Object permissions" under the Edit Tab 
  • Give the necessary permissions.
Happy SharePointing :-)