sql - What effect has a grant command when no schema is specified -


basically tried grant permissions schemas in database user have created before so

use mydatabase go   grant insert, select, execute, delete myuser -- note no schema specified go 

now, effect quite confusing. according ssms myuser has follwing effective permissions on mydatabase: connect, delete, execute, insert, select.

however, doesn't seem have rights on schema. question is, effect of grant above , there way grant permissions on every schema in database (sth. wildcard)?

you can find out permissions granted using following query:

select d.*, object_name(major_id) objectname, schema_name(major_id) schemaname  sys.database_permissions d  inner join sys.database_principals u on d.grantee_principal_id=u.principal_id  u.name='myuser' 

in case, permissions granted on entire database, same thing granting permisions on each schema.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -