When creating a Stored Procedure on your MSSQL Server 2005/2008 you might get an "Access Denied" Error. This is happening because you are trying to run your SP against MASTER database, so obviosly access will be denied.
To successfully run your SP, please make sure you use your database and run SP script against it.

Code:
USE [DATABASE_NAME]
-- Here starts SP script
CREATE PROCEDURE SPTest