以下SQL出现了权限拒绝错误。
drop schema xxx; -- run if xxx exists
go
create schema xxx;
go
alter authorization on schema::xxxto [Domain\user1]
exec ('create view xxx.x as select 1 a') as login = 'Domain\user1'
go
数据库'....'中的CREATE VIEW权限被拒绝
随后的错误也得到了相同的错误。
drop schema xxx;
go
create schema xxx;
go
GRANT CONTROL ON SCHEMA::[xxx] TO [Domain\user1]
exec ('create view xxx.x as select 1 a') as login = 'Domain\user1'
go
为什么不起作用?