We recommend using Visual Studio 2017

Application.GetPackageRoles Method

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 void GetPackageRoles(
	string serverName,
	string packagePath,
	out string readerRole,
	out string writerRole


Type: String
Specify the name and instance of the server that contains the package.
Type: String
Specify the name of the package.
Type: String
Returns the roles with read access.
Type: 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);