Deny Method (Database)
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
The Deny method negates a granted database permission or a list of granted permissions for one or more users or roles on Microsoft SQL Server or later.
Set Privilege by using these SQLDMO_PRIVILEGE_TYPE values.
Deny all granted database permissions.
Deny permission to execute the CREATE DATABASE statement.
Deny permission to execute the CREATE DEFAULT statement.
Can create and own UserDefinedFunction objects.
Can create and own StoredProcedure objects.
Deny permission to execute the CREATE RULE statement.
Deny permission to execute the CREATE TABLE statement.
Deny permission to execute the CREATE VIEW statement.
Deny permission to back up a database.
Maintained for compatibility with previous versions of SQL-DMO.
Deny permission to backup a database transaction log.
Denying permissions to database users and roles by using the Deny method of the Database object requires appropriate permission. The SQL Server login used for SQLServer object connection must be a member of the system-defined role sysadmin.
For more information about setting multistring parameters, see Using SQL-DMO Multistrings.