I have SQL Server user in the database and for some reason, user is not able to view the tables when connecting
Here are the commands that I am using to create that user. I do not want to make the user dbuser the owner of the schema.
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]
Even though I am granting all insert and update access on the schema.. the user when logged in with dbuser 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 schema1,schema2, schema3
thanks
{ }) on the editor toolbar to nicely format and syntax highlight it!