Application.GetDtsServerRoles 方法

Returns an array of Strings that lists the roles available for a folder.

命名空间:  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
    The folder whose roles you are interested in.
  • sServerName
    类型:System.String
    The name of the instance that is running the Integration Services service.

返回值

类型:array<System.String[]
An array of Strings, each string containing a role name.

示例

The following code example shows how to retrieve the server roles, assuming the variables have been set to reflect your specific server name and folder path.

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

请参阅

参考

Application 类

Microsoft.SqlServer.Dts.Runtime 命名空间