我遇到以下错误:
Cannot grant, deny, or revoke permissions to sa, dbo, entity owner, information_schema, sys, or yourself.
当我尝试这些命令时
USE ASPState
GO
GRANT EXECUTE ON CreateTempTables TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON DeleteExpiredSessions TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON GetMajorVersion TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON GetHashCode TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempGetAppID TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempGetStateItem TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempGetStateItem2 TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempGetStateItem3 TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempGetStateItemExclusive TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempGetStateItemExclusive2 TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempGetStateItemExclusive3 TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempGetVersion TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempInsertStateItemLong TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempInsertStateItemShort TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempInsertUninitializedItem TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempReleaseStateItemExclusive TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempRemoveStateItem TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempResetTimeout TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempUpdateStateItemLong TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempUpdateStateItemLongNullShort TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempUpdateStateItemShort TO [R2Server\AAOUser]
GO
GRANT EXECUTE ON TempUpdateStateItemShortNullLong TO [R2Server\AAOUser]
GO
因此,我如何知道我的帐户R2Server\AAOUser
对数据库具有哪种类型的权限ASPState
?以及解决该错误的方法是什么(以便我可以将这些权限授予我的帐户)?
您的用户sysadmin在服务器上吗?还是该数据库上的数据库所有者?
—
玛丽安
其实没有。(我的用户帐户不是“
—
杰克
sysadmin
或” db owner
。)
我想我发现我正在
—
杰克
db owner
使用Microsoft SQL Server Management Studio。因此,我可以得出结论,因为我是ASPState
数据库的所有者,所以不需要授予自己任何权限。对?
你是对的。如果您是数据库所有者,则不需要任何其他数据库权限。
—
玛丽安
@谢谢玛丽安,您可能想输入答案,并在sqlcmd中输入要键入的命令,以便一个人知道他对数据库具有什么权限。
—
杰克