Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Application.SetPackageRoles Method

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

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

public void SetPackageRoles(
	string serverName,
	string packagePath,
	string readerRole,
	string writerRole


Type: System.String
Specify the name and instance of the server that contains the package.
Type: System.String
Specify the name of the package.
Type: System.String
Specify a role to have read access.
Type: System.String
Specify a role to have write access.

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

app.SetPackageRoles(serverName, packagePath, readerRole, writerRole); 

Community Additions

© 2015 Microsoft