GetPackageRoles Method

Application.GetPackageRoles Method (String, String, String, String)

 

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.

Namespace:   Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (in Microsoft.SqlServer.ManagedDTS.dll)

Public Sub GetPackageRoles (
	serverName As String,
	packagePath As String,
	<OutAttribute> ByRef readerRole As String,
	<OutAttribute> ByRef writerRole As String
)

Parameters

serverName
Type: System.String

Specify the name and instance of the server that contains the package.

packagePath
Type: System.String

Specify the name of the package.

readerRole
Type: System.String

Returns the roles with read access.

writerRole
Type: 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.

Dim readerRole As String =  Nothing 
Dim writerRole As String =  Nothing 
app.GetPackageRoles(myServerName, packagePath, readerRole, writerRole)
Return to top
Show:
© 2016 Microsoft