четверг, 12 августа 2010 г.

Список таблиц, у которых нет доступа для public

select *
from information_schema.tables t

where table_name not in
(select distinct table_name from information_schema.table_privileges where grantee ='public')

and table_name not in('dtproperties','MSreplication_objects','MSreplication_subscriptions',
'MSsavedforeignkeycolumns','MSsavedforeignkeyextendedproperties','MSsavedforeignkeys',
'MSsnapshotdeliveryprogress')
order by table_name

Комментариев нет:

Отправить комментарий