title: Grant permissions to an application role in SQL Server 2005
body: <p>I have to setup a .net-application that connects to an SQL Server 2005 in a new database. The app uses an application role to authenticate on the server and handles then all security-checks in the app.</p>
  
  <p>I have successfully created the application role and the app can successfully logon to the db. However, the role has no permissions to query any database-object.</p>
  
  <p>How do I assign the roles db_datareader and db_datawriter to the application role so that it has full read-and write access to all tables of the database? Or is there another way to give the role full access to the tables, queries and stored-procedures. </p>
  
  <p>(The app was developped on sql-server 2000, however there are already running instances of it with SQL Server 2005 but I have not seen how it is done that the application role has the desired rights.) </p>
  
  <p>Please note, giving the app role manualy access to every object is not an option because the app creates dynamicly new objects (tables, queries and sp's) and the app must also have access to these new objects without change the roles security configuration.</p>