Application.SetPackageRoles(String, String, String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定具有封裝讀取權限和寫入權限的資料庫角色。 資料庫角色僅適用于儲存在 SQL Server msdb 資料庫中的封裝。
public:
void SetPackageRoles(System::String ^ serverName, System::String ^ packagePath, System::String ^ readerRole, System::String ^ writerRole);
public void SetPackageRoles (string serverName, string packagePath, string readerRole, string writerRole);
member this.SetPackageRoles : string * string * string * string -> unit
Public Sub SetPackageRoles (serverName As String, packagePath As String, readerRole As String, writerRole As String)
參數
- serverName
- String
指定包含封裝的伺服器名稱和執行個體。
- packagePath
- String
指定封裝的名稱。
- readerRole
- String
指定角色具有讀取存取權。
- writerRole
- String
指定角色具有寫入存取權。
範例
下列程式碼範例示範如何設定封裝角色,假設變數已設定為反映您的特定伺服器名稱、封裝路徑和角色。
app.SetPackageRoles(serverName, packagePath, readerRole, writerRole);
app.SetPackageRoles(serverName, packagePath, readerRole, writerRole)