Application.SetPackageRoles(String, String, String, String) Application.SetPackageRoles(String, String, String, String) Application.SetPackageRoles(String, String, String, String) Method

Definition

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.

public:
 void SetPackageRoles(System::String ^ serverName, System::String ^ packagePath, System::String ^ readerRole, System::String ^ writerRole);
public void SetPackageRoles (string serverName, string packagePath, string readerRole, string writerRole);
Public Sub SetPackageRoles (serverName As String, packagePath As String, readerRole As String, writerRole As String)

Parameters

serverName
String String String

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

packagePath
String String String

Specify the name of the package.

readerRole
String String String

Specify a role to have read access.

writerRole
String String String

Specify a role to have write access.

Examples

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);   
app.SetPackageRoles(serverName, packagePath, readerRole, writerRole)  

Applies to