Metoda Application.SetPackageRoles
Ustawia role bazy danych, które mają dostęp do odczytu i zapisu do pakiet.Database roles apply only to package stored in the SQL Server msdb database.
Przestrzeń nazw: Microsoft.SqlServer.Dts.Runtime
Zestaw: Microsoft.SqlServer.ManagedDTS (w Microsoft.SqlServer.ManagedDTS.dll)
Składnia
'Deklaracja
Public Sub SetPackageRoles ( _
serverName As String, _
packagePath As String, _
readerRole As String, _
writerRole As String _
)
'Użycie
Dim instance As Application
Dim serverName As String
Dim packagePath As String
Dim readerRole As String
Dim writerRole As String
instance.SetPackageRoles(serverName, _
packagePath, readerRole, writerRole)
public void SetPackageRoles(
string serverName,
string packagePath,
string readerRole,
string writerRole
)
public:
void SetPackageRoles(
String^ serverName,
String^ packagePath,
String^ readerRole,
String^ writerRole
)
member SetPackageRoles :
serverName:string *
packagePath:string *
readerRole:string *
writerRole:string -> unit
public function SetPackageRoles(
serverName : String,
packagePath : String,
readerRole : String,
writerRole : String
)
Parametry
- serverName
Typ: System.String
Określ nazwę i wystąpienie serwera, który zawiera pakiet.
- packagePath
Typ: System.String
Określ nazwę pakiet.
- readerRole
Typ: System.String
Określenie roli mają dostęp do odczytu.
- writerRole
Typ: System.String
Określenie roli mają dostęp do zapisu.
Przykłady
Następujący kod ilustruje przykład sposobu zestaw pakiet ról, przy założeniu, że zostały zmienne zestaw aby odzwierciedlić nazwę określonego serwera, ścieżką pakietu i role.
app.SetPackageRoles(serverName, packagePath, readerRole, writerRole);
app.SetPackageRoles(serverName, packagePath, readerRole, writerRole)