Application.SetPackageRoles(String, String, String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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);
member this.SetPackageRoles : string * string * string * string -> unit
Public Sub SetPackageRoles (serverName As String, packagePath As String, readerRole As String, writerRole As String)
Parameters
- serverName
- String
Specify the name and instance of the server that contains the package.
- packagePath
- String
Specify the name of the package.
- readerRole
- String
Specify a role to have read access.
- writerRole
- 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)