Deny Method (Database)
Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.
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.
구문
object
.Deny(
Privilege
,
GranteeNames
)
Parts
object
Expression that evaluates to an object in the Applies To list.Privilege
Long integer that specifies one or more database privileges as described in Settings.GranteeNames
SQL Distributed Management Objects (SQL-DMO) multistring listing users or roles.
Prototype (C/C++)
HRESULT Deny(
SQLDMO_PRIVILEGE_TYPE iPrivileges,
SQLDMO_LPCSTR GranteeNames);
Settings
Set Privilege by using these SQLDMO_PRIVILEGE_TYPE values.
Constant |
Value |
Description |
---|---|---|
SQLDMOPriv_AllDatabasePrivs |
130944 |
Deny all granted database permissions. |
SQLDMOPriv_CreateDatabase |
256 |
Deny permission to execute the CREATE DATABASE statement. |
SQLDMOPriv_CreateDefault |
4096 |
Deny permission to execute the CREATE DEFAULT statement. |
SQLDMOPriv_CreateFunction |
65366 |
Can create and own UserDefinedFunction objects. |
SQLDMOPriv_CreateProcedure |
1024 |
Can create and own StoredProcedure objects. |
SQLDMOPriv_CreateRule |
16384 |
Deny permission to execute the CREATE RULE statement. |
SQLDMOPriv_CreateTable |
128 |
Deny permission to execute the CREATE TABLE statement. |
SQLDMOPriv_CreateView |
512 |
Deny permission to execute the CREATE VIEW statement. |
SQLDMOPriv_DumpDatabase |
2048 |
Deny permission to back up a database. |
SQLDMOPriv_DumpTable |
32768 |
Maintained for compatibility with previous versions of SQL-DMO. |
SQLDMOPriv_DumpTransaction |
8192 |
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.