检查 Windows 身份验证用户在 sql 服务器 2008 中是否具有正确的权限?
Check if Windows Authentication user has correct privilege in sql server 2008?
我们网络中的一位用户需要访问 sql server database
中的一个 table。由于它是 Windows Authentication
,我在 Security\Logins
中创建了用户,并在 Security\Users
中为数据库添加了用户。我还添加了权限。
现在我想测试一下。如果我没有该用户的密码,我该怎么办?很明显,他不会给我的。
谢谢。
Execute As User = 'domain\Name';
-- Perform the test - use a Transaction if you need to test data modifications
Select * From schema.table;
Revert
我们网络中的一位用户需要访问 sql server database
中的一个 table。由于它是 Windows Authentication
,我在 Security\Logins
中创建了用户,并在 Security\Users
中为数据库添加了用户。我还添加了权限。
现在我想测试一下。如果我没有该用户的密码,我该怎么办?很明显,他不会给我的。
谢谢。
Execute As User = 'domain\Name';
-- Perform the test - use a Transaction if you need to test data modifications
Select * From schema.table;
Revert