GetPackageRoles メソッド

パッケージに対する読み取りアクセス権および書き込みアクセス権を持つデータベース ロールを返します。データベース ロールは、SQL Servermsdb データベースに格納されたパッケージにのみ適用されます。

名前空間:  Microsoft.SqlServer.Dts.Runtime
アセンブリ:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS.dll)

構文

'宣言
Public Sub GetPackageRoles ( _
    serverName As String, _
    packagePath As String, _
    <OutAttribute> ByRef readerRole As String, _
    <OutAttribute> ByRef writerRole As String _
)
'使用
Dim instance As Application
Dim serverName As String
Dim packagePath As String
Dim readerRole As String
Dim writerRole As String

instance.GetPackageRoles(serverName, _
    packagePath, readerRole, writerRole)
public void GetPackageRoles(
    string serverName,
    string packagePath,
    out string readerRole,
    out string writerRole
)
public:
void GetPackageRoles(
    String^ serverName, 
    String^ packagePath, 
    [OutAttribute] String^% readerRole, 
    [OutAttribute] String^% writerRole
)
member GetPackageRoles : 
        serverName:string * 
        packagePath:string * 
        readerRole:string byref * 
        writerRole:string byref -> unit 
public function GetPackageRoles(
    serverName : String, 
    packagePath : String, 
    readerRole : String, 
    writerRole : String
)

パラメーター

  • serverName
    型: System. . :: . .String
    パッケージを含むサーバーの名前とインスタンスを指定します。

使用例

次のコード例では、特定のサーバー名、パッケージ パス、およびフォルダー パスを反映して変数が設定されているものとして、パッケージ ロールの取得方法を示しています。

string readerRole = null;
string writerRole = null;
app.GetPackageRoles(myServerName, packagePath, out readerRole, out writerRole);
Dim readerRole As String =  Nothing 
Dim writerRole As String =  Nothing 
app.GetPackageRoles(myServerName, packagePath, readerRole, writerRole)