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

Definition

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.

public:
 void GetPackageRoles(System::String ^ serverName, System::String ^ packagePath, [Runtime::InteropServices::Out] System::String ^ % readerRole, [Runtime::InteropServices::Out] System::String ^ % writerRole);
public void GetPackageRoles (string serverName, string packagePath, out string readerRole, out string writerRole);
Public Sub GetPackageRoles (serverName As String, packagePath As String, ByRef readerRole As String, ByRef 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

Returns the roles with read access.

writerRole

Returns the roles with write access.

Examples

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)  

Applies to