Skip to main content
deleted 4 characters in body
Source Link

SELECT permission on a view doesn't grant SELECT permission on the referenced tables. Instead if the view and the tables have the same owner, there is an "ownership chain" between them and permissions on the tables are not checked.

So ensure that the view and tables have the same owner.

Objects are owned by the owner of their schema by default. But it It is possible (but unwise) to change the ownership of a single object. Anyway you can list the objects and their owners like this:

select o.name, type_desc, user_name(coalesce(o.principal_id,s.principal_id)) owner
from sys.objects o
join sys.schemas s
  on o.schema_id = s.schema_id
where o.is_ms_shipped = 0
  and type_desc in ('USER_TABLE','VIEW')
order by type_desc, name

SELECT permission on a view doesn't grant SELECT permission on the referenced tables. Instead if the view and the tables have the same owner, there is an "ownership chain" between them and permissions on the tables are not checked.

So ensure that the view and tables have the same owner.

Objects are owned by the owner of their schema by default. But it is possible (but unwise) to change the ownership of a single object. Anyway you can list the objects and their owners like this:

select o.name, type_desc, user_name(coalesce(o.principal_id,s.principal_id)) owner
from sys.objects o
join sys.schemas s
  on o.schema_id = s.schema_id
where o.is_ms_shipped = 0
  and type_desc in ('USER_TABLE','VIEW')
order by type_desc, name

SELECT permission on a view doesn't grant SELECT permission on the referenced tables. Instead if the view and the tables have the same owner, there is an "ownership chain" between them and permissions on the tables are not checked.

So ensure that the view and tables have the same owner.

Objects are owned by the owner of their schema by default. It is possible (but unwise) to change the ownership of a single object. Anyway you can list the objects and their owners like this:

select o.name, type_desc, user_name(coalesce(o.principal_id,s.principal_id)) owner
from sys.objects o
join sys.schemas s
  on o.schema_id = s.schema_id
where o.is_ms_shipped = 0
  and type_desc in ('USER_TABLE','VIEW')
order by type_desc, name
added 481 characters in body
Source Link

SELECT permission on a view doesn't grant SELECT permission on the referenced tables. Instead if the view and the tables have the same owner, there is an "ownership chain" between them and permissions on the tables are not checked.

So ensure that the view and tables have the same owner.

Objects are owned by the owner of their schema by default. But it is possible (but unwise) to change the ownership of a single object. Anyway you can list the objects and their owners like this:

select o.name, type_desc, user_name(coalesce(o.principal_id,s.principal_id)) owner
from sys.objects o
join sys.schemas s
  on o.schema_id = s.schema_id
where o.is_ms_shipped = 0
  and type_desc in ('USER_TABLE','VIEW')
order by type_desc, name

SELECT permission on a view doesn't grant SELECT permission on the referenced tables. Instead if the view and the tables have the same owner, there is an "ownership chain" between them and permissions on the tables are not checked.

So ensure that the view and tables have the same owner.

SELECT permission on a view doesn't grant SELECT permission on the referenced tables. Instead if the view and the tables have the same owner, there is an "ownership chain" between them and permissions on the tables are not checked.

So ensure that the view and tables have the same owner.

Objects are owned by the owner of their schema by default. But it is possible (but unwise) to change the ownership of a single object. Anyway you can list the objects and their owners like this:

select o.name, type_desc, user_name(coalesce(o.principal_id,s.principal_id)) owner
from sys.objects o
join sys.schemas s
  on o.schema_id = s.schema_id
where o.is_ms_shipped = 0
  and type_desc in ('USER_TABLE','VIEW')
order by type_desc, name
Source Link

SELECT permission on a view doesn't grant SELECT permission on the referenced tables. Instead if the view and the tables have the same owner, there is an "ownership chain" between them and permissions on the tables are not checked.

So ensure that the view and tables have the same owner.