Exportera (0) Skriv ut
Visa allt
EN
Det här innehållet finns inte tillgängligt på ditt språk men här finns den engelska versionen,
1 av 2 bedömde detta vara till hjälp - Bedöm det här ämnet

HAS_PERMS_BY_NAME (Azure SQL Database)

This topic is OBSOLETE. You can find the most current version in the SQL 14 Transact-SQL Reference.

ImportantImportant
This topic is not maintained. For the current version, see HAS_PERMS_BY_NAME.

Evaluates the effective permission of the current user on a securable in Microsoft Windows Azure SQL Database. 


HAS_PERMS_BY_NAME (securable,securable_class,permission  
    [ ,sub-securable ] [ ,sub-securable_class ] )
securable
Is the name of the securable. The securable is a scalar expression of type sysname.

securable_class
Is the name of the class of securable against which the permission is tested. The securable_class is a scalar expression of type nvarchar(60).

The securable_class argument must be set to one of the following: DATABASE, OBJECT, ROLE, SCHEMA, or USER.

permission
A nonnull scalar expression of type sysname that represents the permission name to be checked. There is no default. The permission name ANY is a wildcard.

sub-securable
An optional scalar expression of type sysname that represents the name of the securable sub-entity against which the permission is tested. The default is NULL.

sub-securable_class
An optional scalar expression of type nvarchar(60) that represent the class of securable sub-entity against which the permission is tested. The default is NULL.

The sub-securable_class argument is valid only if the securable_class argument is set to OBJECT. If the securable_class argument is set to OBJECT, the sub-securable_class argument must be set to COLUMN.

 

Return Value Description

0

When the user has no effective permission on the securable.

1

When the user has effective permission on the securable.

NULL

When the query fails.

If the securable is the server itself, this value should be set to NULL, and the securable_class should be set to database; otherwise the query is considered failed and the return value is NULL.

For more information about the arguments and the HAS_PERMS_BY_NAME statement, see HAS_PERMS_BY_NAME in SQL Server Books Online.

Var detta till hjälp?
(1500 tecken kvar)
Tack för dina kommentarer

Gruppinnehåll

Lägg till
Visa:
© 2014 Microsoft. Med ensamrätt.