Klasa SnapshotGenerationAgent
Zapewnia funkcje replikacji agenta migawki.
Hierarchia dziedziczenia
System.Object
System.MarshalByRefObject
Microsoft.SqlServer.Replication.AgentCore
Microsoft.SqlServer.Replication.SnapshotGenerationAgent
Przestrzeń nazw: Microsoft.SqlServer.Replication
Zestaw: Microsoft.SqlServer.Replication (w Microsoft.SqlServer.Replication.dll)
Składnia
'Deklaracja
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
<GuidAttribute("141945FD-18BD-4222-B6D9-F937704C7FFE")> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class SnapshotGenerationAgent _
Inherits AgentCore _
Implements ISnapshotGenerationAgent
'Użycie
Dim instance As SnapshotGenerationAgent
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
[GuidAttribute("141945FD-18BD-4222-B6D9-F937704C7FFE")]
[ComVisibleAttribute(true)]
public sealed class SnapshotGenerationAgent : AgentCore,
ISnapshotGenerationAgent
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)]
[GuidAttribute(L"141945FD-18BD-4222-B6D9-F937704C7FFE")]
[ComVisibleAttribute(true)]
public ref class SnapshotGenerationAgent sealed : public AgentCore,
ISnapshotGenerationAgent
[<SealedAttribute>]
[<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)>]
[<GuidAttribute("141945FD-18BD-4222-B6D9-F937704C7FFE")>]
[<ComVisibleAttribute(true)>]
type SnapshotGenerationAgent =
class
inherit AgentCore
interface ISnapshotGenerationAgent
end
public final class SnapshotGenerationAgent extends AgentCore implements ISnapshotGenerationAgent
Typ SnapshotGenerationAgent uwidacznia następujące elementy członkowskie.
Konstruktorzy
Nazwa | Opis | |
---|---|---|
![]() |
SnapshotGenerationAgent | Tworzy wystąpienie SnapshotGenerationAgent klasy |
Do góry
Właściwości
Nazwa | Opis | |
---|---|---|
![]() |
AbortPolicy | Pobiera lub ustawia jak uruchomiony agent replikacja wątki są przerywane, gdy występuje niekontrolowanej zamknięcia. (Dziedziczony z AgentCore). |
![]() |
BcpBatchSize | Pobiera lub zestaw liczbę wierszy do wysłania do dystrybutora w zbiorczej operacji kopiowania. |
![]() |
ComErrorCollection | Zwraca informacje na temat błędów występujących podczas wykonywania agenta. (Dziedziczony z AgentCore). |
![]() |
Distributor | Pobiera lub ustawia nazwę wystąpienie programu SQL Server, działając jako dystrybutor publikacja. |
![]() |
DistributorDeadlockPriority | Pobiera lub ustawia priorytet połączenia agenta migawki dystrybutora, po wystąpieniu zakleszczenie. |
![]() |
DistributorEncryptedPassword | Infrastruktura. |
![]() |
DistributorEncryptionLevel | Pobiera zestawów poziom szyfrowanie SSL (Secure Sockets Layer) używane przez agenta migawki, nawiązując do dystrybutora. |
![]() |
DistributorLogin | Pobiera lub ustawia nazwę logowania używane lokalnie do dystrybutora za pomocą SQL Server uwierzytelniania. |
![]() |
DistributorNetworkLibrary | Infrastruktura. |
![]() |
DistributorPassword | Ustawia hasło używane przy łączeniu się lokalnie do dystrybutora za pomocą SQL Server uwierzytelniania. |
![]() |
DistributorSecurityMode | Pobiera lub ustawia tryb zabezpieczeń używany przy łączeniu się lokalnie do dystrybutora. |
![]() |
DynamicFilterHostName | Pobiera lub ustawia wartość dostarczonych do HOST_NAME w funkcji sparametryzowany filtr wierszy. |
![]() |
DynamicFilterLogin | Pobiera lub ustawia wartość dostarczonych do SUSER_SNAME w funkcji sparametryzowany filtr wierszy. |
![]() |
DynamicSnapshotLocation | Pobiera lub Ustawia lokalizację partycjonowana migawka subskrypcja scalania publikacja, która jest zdefiniowana na podstawie filtr wiersza sparametryzowanej. |
![]() |
FieldDelimiter | Pobiera lub ustawia znak lub sekwencję znaków, który oznacza koniec pole w pliku masowego kopiowania danych programu SQL Server. |
![]() |
FlatExceptionCollection | Infrastruktura. (Dziedziczony z AgentCore). |
![]() |
HistoryVerboseLevel | Pobiera lub ustawia ilość historia zarejestrowane podczas wykonywania agenta. (Dziedziczony z AgentCore). |
![]() |
HRBcpBlocks | Infrastruktura. |
![]() |
HRBcpBlockSize | Infrastruktura. |
![]() |
HRBcpDynamicBlocks | Infrastruktura. |
![]() |
LoginTimeout | GET lub ustawia liczbę sekund przed logowania limit czasu połączeń nawiązywanych przez agenta. (Dziedziczony z AgentCore). |
![]() |
MaxBcpThreads | Pobiera lub ustawia liczbę kopiowanie masowe operacji, które mogą być wykonywane równolegle. |
![]() |
MaxNetworkOptimization | Pobiera lub ustawia, czy limit partycji usuwa są wysyłane do subskrybenta. |
![]() |
OnetimeDynamicSnapshot | Infrastruktura. |
![]() |
Output | Pobieranie lub ustawia nazwę i ścieżka pliku wyjściowego agenta. (Dziedziczony z AgentCore). |
![]() |
OutputVerboseLevel | Pobiera lub ustawia poziom szczegółowości informacje zapisane w pliku wyjściowym agenta. (Dziedziczony z AgentCore). |
![]() |
PacketSize | Infrastruktura. (Dziedziczony z AgentCore). |
![]() |
ProfileName | Pobiera lub ustawia profil programu agent używane podczas uruchamiania agenta. (Dziedziczony z AgentCore). |
![]() |
Publication | Pobiera lub ustawia nazwę publikacja. |
![]() |
Publisher | Pobiera lub ustawia nazwę wystąpienie programu SQL Server, który jest Wydawca. |
![]() |
PublisherDatabase | Pobiera lub ustawia nazwę baza danych publikacja. |
![]() |
PublisherDeadlockPriority | Pobiera lub ustawia priorytet połączenie migawki agenta Wydawca po wystąpieniu zakleszczenie. |
![]() |
PublisherEncryptedPassword | Infrastruktura. |
![]() |
PublisherEncryptionLevel | Pobiera zestawów poziom szyfrowanie SSL (Secure Sockets Layer) używane przez agenta migawki, nawiązując do dystrybutora. |
![]() |
PublisherFailoverPartner | Pobiera lub ustawia wystąpienie partner pracy awaryjnej SQL Server uczestniczących w bazie danych, dublowanie sesja z baza danych publikacja. (Dziedziczony z AgentCore). |
![]() |
PublisherLogin | Pobiera lub ustawia nazwę logowania używane podczas łączenia się przy użyciu Wydawca SQL Server uwierzytelniania. |
![]() |
PublisherNetworkLibrary | Infrastruktura. |
![]() |
PublisherPassword | Ustawia hasło używane przy łączeniu się z pomocą Wydawca SQL Server uwierzytelniania. |
![]() |
PublisherSecurityMode | Pobiera lub ustawia tryb zabezpieczeń używane podczas łączenia się z Wydawca. |
![]() |
QueryTimeout | GET lub ustawia limit czasu liczba sekund przed kwerendy. (Dziedziczony z AgentCore). |
![]() |
ReplicationType | Pobiera lub ustawia typ publikacja. |
![]() |
RowDelimiter | Pobiera lub ustawia znak lub sekwencję znaków, znaki końca wiersza w pliku masowego kopiowania danych programu SQL Server. |
![]() |
SecureDistributorEncryptedPassword | Infrastruktura. |
![]() |
SecureDistributorPassword | Ustawia hasło (jako SecureString obiektu) używanej przy łączeniu się lokalnie do dystrybutora przy użyciu uwierzytelniania programu SQL Server. |
![]() |
SecurePublisherEncryptedPassword | Infrastruktura. |
![]() |
SecurePublisherPassword | Ustawia hasło (jako SecureString obiektu) używane podczas łączenia się z Wydawca przy użyciu uwierzytelniania programu SQL Server. |
![]() |
StartQueueTimeout | Pobiera lub ustawia czas oczekiwania agenta migawki przy uruchomionym maksymalną liczbę równoczesnych partycjonowana migawka procesów dla publikacja seryjnej. |
![]() |
Supports70Subscribers | Pobiera lub ustawia, czy wygenerowane migawka obsługuje programu SQL Server 7.0 subskrybentów. |
Do góry
Metody
Nazwa | Opis | |
---|---|---|
![]() |
Abort | (Dziedziczony z AgentCore). |
![]() |
CreateObjRef | (Dziedziczony z MarshalByRefObject). |
![]() |
Equals | (Dziedziczony z Object). |
![]() |
Finalize | (Dziedziczony z Object). |
![]() |
GenerateSnapshot | Uruchamia agenta migawka, aby wygenerować migawkę. |
![]() |
GetHashCode | (Dziedziczony z Object). |
![]() |
GetLifetimeService | (Dziedziczony z MarshalByRefObject). |
![]() |
GetType | (Dziedziczony z Object). |
![]() |
InitializeLifetimeService | (Dziedziczony z MarshalByRefObject). |
![]() |
MemberwiseClone() | (Dziedziczony z Object). |
![]() |
MemberwiseClone(Boolean) | (Dziedziczony z MarshalByRefObject). |
![]() |
ResetParametersToDefault | (Dziedziczony z AgentCore). |
![]() |
ToString | (Dziedziczony z Object). |
Do góry
Zdarzenia
Nazwa | Opis | |
---|---|---|
![]() |
ComStatus | (Dziedziczony z AgentCore). |
![]() |
Status | Występuje, gdy uruchomiony agent zwraca informacje o stanie. (Dziedziczony z AgentCore). |
Do góry
Uwagi
SnapshotGenerationAgent Klasy zapewnia programowego, bezpośredniego dostępu do agenta migawki.
SnapshotGenerationAgent Klasy pozwala wykonywać następujące zadania replikacja:
Wstępne generowaniemigawka
Generowanie partycjonowana migawka dla subskrypcja zdefiniowane na podstawie sparametryzowana filtru.
Przykłady
Ten przykład generuje standard migawka dla transakcyjnych publikacja.
// Set the Publisher, publication database, and publication names.
string publicationName = "AdvWorksProductTran";
string publicationDbName = "AdventureWorks2008R2";
string publisherName = publisherInstance;
string distributorName = publisherInstance;
SnapshotGenerationAgent agent;
try
{
// Set the required properties for Snapshot Agent.
agent = new SnapshotGenerationAgent();
agent.Distributor = distributorName;
agent.DistributorSecurityMode = SecurityMode.Integrated;
agent.Publisher = publisherName;
agent.PublisherSecurityMode = SecurityMode.Integrated;
agent.Publication = publicationName;
agent.PublisherDatabase = publicationDbName;
agent.ReplicationType = ReplicationType.Transactional;
// Start the agent synchronously.
agent.GenerateSnapshot();
}
catch (Exception ex)
{
// Implement custom application error handling here.
throw new ApplicationException(String.Format(
"A snapshot could not be generated for the {0} publication."
, publicationName), ex);
}
' Set the Publisher, publication database, and publication names.
Dim publicationName As String = "AdvWorksProductTran"
Dim publicationDbName As String = "AdventureWorks2008R2"
Dim publisherName As String = publisherInstance
Dim distributorName As String = publisherInstance
Dim agent As SnapshotGenerationAgent
Try
' Set the required properties for Snapshot Agent.
agent = New SnapshotGenerationAgent()
agent.Distributor = distributorName
agent.DistributorSecurityMode = SecurityMode.Integrated
agent.Publisher = publisherName
agent.PublisherSecurityMode = SecurityMode.Integrated
agent.Publication = publicationName
agent.PublisherDatabase = publicationDbName
agent.ReplicationType = ReplicationType.Transactional
' Start the agent synchronously.
agent.GenerateSnapshot()
Catch ex As Exception
' Implement custom application error handling here.
Throw New ApplicationException(String.Format( _
"A snapshot could not be generated for the {0} publication." _
, publicationName), ex)
End Try
Ten przykład generuje standard migawka do publikacja korespondencji seryjnej.
// Set the Publisher, publication database, and publication names.
string publicationName = "AdvWorksSalesOrdersMerge";
string publicationDbName = "AdventureWorks2008R2";
string publisherName = publisherInstance;
string distributorName = publisherInstance;
SnapshotGenerationAgent agent;
try
{
// Set the required properties for Snapshot Agent.
agent = new SnapshotGenerationAgent();
agent.Distributor = distributorName;
agent.DistributorSecurityMode = SecurityMode.Integrated;
agent.Publisher = publisherName;
agent.PublisherSecurityMode = SecurityMode.Integrated;
agent.Publication = publicationName;
agent.PublisherDatabase = publicationDbName;
agent.ReplicationType = ReplicationType.Merge;
// Start the agent synchronously.
agent.GenerateSnapshot();
}
catch (Exception ex)
{
// Implement custom application error handling here.
throw new ApplicationException(String.Format(
"A snapshot could not be generated for the {0} publication."
, publicationName), ex);
}
' Set the Publisher, publication database, and publication names.
Dim publicationName As String = "AdvWorksSalesOrdersMerge"
Dim publicationDbName As String = "AdventureWorks2008R2"
Dim publisherName As String = publisherInstance
Dim distributorName As String = publisherInstance
Dim agent As SnapshotGenerationAgent
Try
' Set the required properties for Snapshot Agent.
agent = New SnapshotGenerationAgent()
agent.Distributor = distributorName
agent.DistributorSecurityMode = SecurityMode.Integrated
agent.Publisher = publisherName
agent.PublisherSecurityMode = SecurityMode.Integrated
agent.Publication = publicationName
agent.PublisherDatabase = publicationDbName
agent.ReplicationType = ReplicationType.Merge
' Start the agent synchronously.
agent.GenerateSnapshot()
Catch ex As Exception
' Implement custom application error handling here.
Throw New ApplicationException(String.Format( _
"A snapshot could not be generated for the {0} publication." _
, publicationName), ex)
End Try
W tym przykładzie overloads HOST_NAME funkcja Generowanie filtrowane dane migawka subskrypcja do publikacja korespondencji seryjnej, która została sparametryzowana filtru.
// Set the Publisher, publication database, and publication names.
string publicationName = "AdvWorksSalesOrdersMerge";
string publicationDbName = "AdventureWorks2008R2";
string publisherName = publisherInstance;
string distributorName = publisherInstance;
SnapshotGenerationAgent agent;
try
{
// Set the required properties for Snapshot Agent.
agent = new SnapshotGenerationAgent();
agent.Distributor = distributorName;
agent.DistributorSecurityMode = SecurityMode.Integrated;
agent.Publisher = publisherName;
agent.PublisherSecurityMode = SecurityMode.Integrated;
agent.Publication = publicationName;
agent.PublisherDatabase = publicationDbName;
agent.ReplicationType = ReplicationType.Merge;
// Specify the partition information to generate a
// filtered snapshot based on Hostname.
agent.DynamicFilterHostName = hostname;
// Start the agent synchronously.
agent.GenerateSnapshot();
}
catch (Exception ex)
{
// Implement custom application error handling here.
throw new ApplicationException(String.Format(
"A snapshot could not be generated for the {0} publication."
, publicationName), ex);
}
' Set the Publisher, publication database, and publication names.
Dim publicationName As String = "AdvWorksSalesOrdersMerge"
Dim publicationDbName As String = "AdventureWorks2008R2"
Dim publisherName As String = publisherInstance
Dim distributorName As String = publisherInstance
Dim agent As SnapshotGenerationAgent
Try
' Set the required properties for Snapshot Agent.
agent = New SnapshotGenerationAgent()
agent.Distributor = distributorName
agent.DistributorSecurityMode = SecurityMode.Integrated
agent.Publisher = publisherName
agent.PublisherSecurityMode = SecurityMode.Integrated
agent.Publication = publicationName
agent.PublisherDatabase = publicationDbName
agent.ReplicationType = ReplicationType.Merge
' Specify the partition information to generate a
' filtered snapshot based on Hostname.
agent.DynamicFilterHostName = hostname
' Start the agent synchronously.
agent.GenerateSnapshot()
Catch ex As Exception
' Implement custom application error handling here.
Throw New ApplicationException(String.Format( _
"A snapshot could not be generated for the {0} publication." _
, publicationName), ex)
End Try
Bezpieczeństwo wątków
Wszystkie publiczne statyczny (Shared w języku Visual Basic) elementy członkowskie tego typu są bezpieczne dla wątków. Nie ma gwarancji, że elementy członkowskie wystąpień będą bezpieczne dla wątków.