title: Create user in SQL Server 2008
body: <p>I have SQL Server user in the database and for some reason, user is not able to  view the tables when connecting</p>
  
  <p>Here are the commands that I am using to create that user.  I do not want to make the user <code>dbuser</code> the owner of the schema. </p>
  
  <pre><code>create user dbuser for login dbuser'
  
  --on the specific database, I am using these commands.
  exec sp_addrolemember @rolename = 'db_datareader', @membername = 'dbuser'
  exec sp_addrolemember @rolename = 'db_datawriter', @membername = 'dbuser'
  
  grant select on schema :: [schema1] TO [dbuser]
  grant insert on schema  :: [schema1] TO [dbuser]
  grant update  on schema :: [schema1] TO [dbuser]
  grant execute  on schema  :: [schema1] TO [dbuser]
  
  grant select on schema :: [schema2] TO [dbuser]
  grant insert on schema  :: [schema2] TO [dbuser]
  grant update  on schema  :: [schema2] TO [dbuser]
  grant execute  on schema  :: [schema2] TO [dbuser]
  </code></pre>
  
  <p>Even though I am granting all insert and update access on the schema.. the user when logged in with <code>dbuser</code> is not able to view the any of the tables from any of the schema. He just sees the system tables tab when the user tries to connect to the database. User needs to see all the tables under the <code>schema1,schema2, schema3</code> </p>
  
  <p>thanks</p>