title: SQLMembershipProvider - Adding membership to an existing database. Setting permissions
body: <p>I am adding membership-related schemas to an existing database (lets call it myDatabase) following <a href="https://web.archive.org/web/20210506052241/http://aspnet.4guysfromrolla.com/articles/040506-1.aspx" rel="nofollow noreferrer">those instructions</a>.</p>
  
  <p>As a results the number of tables, views and stored procedures are being created in myDatabase.</p>
  
  <p>The next step is to modify web.config for the application to use CustomizedMembershipProvider</p>
  
  <pre><code>&lt;membership defaultProvider="CustomizedMembershipProvider"&gt;
        &lt;providers&gt;
           &lt;add name="CustomizedMembershipProvider"
                type="System.Web.Security.SqlMembershipProvider"
                connectionStringName="MyDBConnectionString" /&gt;
        &lt;/providers&gt;
      &lt;/membership&gt;
  </code></pre>
  
  <p>Then we also need to specify the connection string like:</p>
  
  <pre><code>&lt;connectionStrings&gt;
       &lt;add name="MyDB" MyDBConnectionString ="..." /&gt;
    &lt;/connectionStrings&gt;
  </code></pre>
  
  <p><strong>Here is my question:</strong></p>
  
  <ol>
  <li>Should I use different connection string to the one the application uses? As is there a need to create a new user in the database with permissions related specifically to the membership objects?</li>
  <li>Once the connection string is specified with the User ID etc., do I need to grant permissions for that user for those newly created objects? Would that be for stored procedures only or also tables and views?</li>
  </ol>
  
  <p><strong>EDIT:</strong>
  I noticed that there was a set of roles created in the database along with the membership object. So it is a matter of assigning the user to the proper role(s). The roles are the likes of </p>
  
  <pre><code>aspnet_Membership_FullAccess
  aspnet_Personalization_FullAccess
  etc...
  </code></pre>
  
  <p>So the only the first part of the question remains in place. So is there a point in creating a new database user (so separate db connection)</p>