共用方式為


SPUsageDatabase.GrantAccess method (String, String)

授與指定的使用者或群組資料庫存取權,並將它們新增至指定的 sql server 角色。

Namespace:  Microsoft.SharePoint.Administration
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Sub GrantAccess ( _
    account As String, _
    role As String _
)
'用途
Dim instance As SPUsageDatabase
Dim account As String
Dim role As String

instance.GrantAccess(account, role)
public void GrantAccess(
    string account,
    string role
)

參數

  • role
    Type: System.String

    使用者應新增 sql 角色。如果角色不存在,則會建立。

請參閱

參照

SPUsageDatabase class

SPUsageDatabase members

GrantAccess overload

Microsoft.SharePoint.Administration namespace