次の方法で共有


Application.GetDtsServerRoles メソッド

フォルダーが使用できるロールの一覧を示す String の配列を返します。

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

構文

'宣言
Public Function GetDtsServerRoles ( _
    sFolderPath As String, _
    sServerName As String _
) As String()
'使用
Dim instance As Application 
Dim sFolderPath As String 
Dim sServerName As String 
Dim returnValue As String()

returnValue = instance.GetDtsServerRoles(sFolderPath, _
    sServerName)
public string[] GetDtsServerRoles(
    string sFolderPath,
    string sServerName
)
public:
array<String^>^ GetDtsServerRoles(
    String^ sFolderPath, 
    String^ sServerName
)
member GetDtsServerRoles : 
        sFolderPath:string * 
        sServerName:string -> string[] 
public function GetDtsServerRoles(
    sFolderPath : String, 
    sServerName : String
) : String[]

パラメーター

  • sFolderPath
    型: System.String
    対象とするロールを保持しているフォルダーです。
  • sServerName
    型: System.String
    Integration Services サービスを実行しているインスタンスの名前です。

戻り値

型: array<System.String[]
String の配列です。各文字列にはロールの名前が含まれています。

使用例

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

string[] availableRoles = app.GetDtsServerRoles(folderPath, myServerName); 
Dim availableRoles() As String =  app.GetDtsServerRoles(folderPath,myServerName)

関連項目

参照

Application クラス

Microsoft.SqlServer.Dts.Runtime 名前空間