Stored Procedure is not possible, you need you access CRM only via CRM services (Webservices). I would suggest a Console application/Plugin according to your requirement
If my response answered your question, please "mark the response as an answer" and also "vote as helpful". Regards, Hari. www.crm2011byhari.blogspot.com