다음을 통해 공유


Application.GetPackageRoles 메서드

Returns the database roles that have read access and write access to the package. Database roles apply only to packages stored in the SQL Server msdb database.

네임스페이스:  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
    Specify the name and instance of the server that contains the package.
  • packagePath
    유형: System.String
    Specify the name of the package.
  • readerRole
    유형: System.String%
    Returns the roles with read access.
  • writerRole
    유형: System.String%
    Returns the roles with write access.

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

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)

참고 항목

참조

Application 클래스

Microsoft.SqlServer.Dts.Runtime 네임스페이스