次の方法で共有


Deny Method (UserDefinedFunction)

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The Deny method negates a granted user-defined function permission or a list of granted permissions for one or more users or roles on Microsoft SQL Server 2000 or later.

構文

object
.Deny(
Privileges
, 
DenyeeNames
, 
[ GrantGrant ] )

Parts

  • object
    Expression that evaluates to an object in the Applies To list.
  • Privileges
    Long integer that specifies one or more user-defined function privileges as described in Settings.
  • DenyeeNames
    SQL Distributed Management Objects (SQL-DMO) multistring that lists users or roles.
  • GrantGrant
    When TRUE, the grantee(s) specified are granted the ability to execute the DENY statement referencing the user-defined function. When FALSE (default), the ability to deny permission is not granted.

Prototype (C/C++)

HRESULT Deny(
SQLDMO_PRIVILEGE_TYPE iPrivileges, 
SQLDMO_LPCSTR DenyeeNames, 
BOOL GrantGrant);

Settings

Set Privileges by using these SQLDMO_PRIVILEGE_TYPE values.

Constant Value Description

SQLDMOPriv_AllObjectPrivs

63

Deny all granted permissions on the referenced stored procedure.

SQLDMOPriv_Execute

16

Deny EXECUTE permission on the referenced stored procedure.

解説

Denying permission to database users and roles by using the Deny method of the UserDefinedFunction object requires appropriate permission. The SQL Server login used for SQLServer object connection must be granted the ability to execute DENY referencing the user-defined function, the owner of the user-defined function, or a member of a role with greater permission.

For more information about setting multistring parameters, see Using SQL-DMO Multistrings.

ms141975.note(ja-jp,SQL.90).gifメモ :
If an application calls Deny on an instance of SQL Server version 7.0, the constant, SQLDMO_E_SQL80ONLY, and the message "This property or method requires Microsoft SQL Server 2000" are returned.

Applies To:

UserDefinedFunction Object