Export (0) Print
Expand All

Replication Snapshot Agent Utility

SQL Server 2000

The Replication Snapshot Agent utility configures and begins the Snapshot Agent, which prepares snapshot files containing schema and data of published tables and database objects, stores the files in the snapshot folder, and records synchronization jobs in the distribution database.

Syntax

snapshot [-?]
-Publisher server_name[\instance_name]
-PublisherDB publisher_database
-Publication publication_name
[-70Subscribers]
[-BcpBatchSize bcp_batch_size]
[-DefinitionFile def_path_and_file_name]
[-Distributor server_name[\instance_name]]
[-DistributorLogin distributor_login]
[-DistributorPassword distributor_password]
[-DistributorSecurityMode [0|1]]
[-DynamicFilterHostName dynamic_filter_host_name]
[-DynamicFilterLogin dynamic_filter_login]
[-DynamicSnapshotLocation dynamic_snapshot_location]
[-FieldDelimiter field_delimiter]
[-HistoryVerboseLevel [1|2|3]
[-LoginTimeOut login_time_out_seconds]
[-MaxBcpThreads]
[-Output output_path_and_file_name]
[-OutputVerboseLevel [0|1|2]
[-ProfileName profile_name]
[-PublisherLogin publisher_login]
[-PublisherPassword publisher_password]
[-PublisherSecurityMode [0|1]]
[-QueryTimeOut query_time_out_seconds]
[-ReplicationType [1|2]]
[-RowDelimiter row_delimiter]
[-StartQueueTimeout start_queue_timeout_seconds]

Note  Parameters can be specified in any order.

Arguments

-?

Prints all available parameters.

-Publisher server_name[\instance_name]

Is the name of the Publisher. Specify server_name for the default instance of Microsoft® SQL Server™ 2000 on that server. Specify server_name\instance_name for a named instance of SQL Server 2000 on that server.

-PublisherDB publisher_database

Is the name of the Publisher database.

-Publication publication

Is the name of the publication. This parameter is only valid if the publication is set to always have a snapshot available for new or reinitialized subscriptions.

-70Subscribers

Must be used if any Subscribers are running SQL Server version 7.0.

-BcpBatchSize bcp_batch_size

Is the number of rows to send in a bulk copy operation. When performing a bcp in operation, the batch size is the number of rows to send to the server as one transaction, and also the number of rows that must be sent before the Distribution Agent logs a bcp progress message. When performing a bcp out operation, a fixed batch size of 1000 is used. A value of 0 indicates no message logging.

-DefinitionFile def_path_and_file_name

Is the path of the agent definition file. An agent definition file contains command prompt arguments for the agent. The content of the file is parsed as an executable file. Use double quotation marks (") to specify argument values containing arbitrary characters.

-Distributor distributor

Is the Distributor name.

-DistributorLogin server_name[\instance_name]

Is the Distributor login name. Specify server_name for the default instance of SQL Server 2000 on that server. Specify server_name\instance_name for a named instance of SQL Server 2000 on that server.

-DistributorPassword distributor_password

Is the Distributor password.

-DistributorSecurityMode [0|1]

Specifies the security mode of the Distributor. A value of 0 indicates SQL Server Authentication Mode (default), and a value of 1 indicates Windows Authentication Mode.

-DynamicFilterHostName dynamic_filter_host_name

Is used to set a value for HOST_NAME() in filtering when a dynamic snapshot is created. For example, if the subset filter clause "rep_id = HOST_NAME()" is specified for an article, and you set the DynamicFilterHostName property to "FBJones" before calling the Merge Agent, only rows having "FBJones" in the rep_id column will be replicated.

-DynamicFilterLogin dynamic_filter_login

Is used to set a value for SUSER_SNAME() in filtering when a dynamic snapshot is created. For example, if the subset filter clause "user_id = SUSER_SNAME()" is specified for an article, and you set the DynamicFilterLogin property to "rsmith" before calling the Run method of the SQLSnapshot object, only rows having "rsmith" in the user_id column will be included in the snapshot.

-DynamicSnapshotLocation dynamic_snapshot_location

Is the location where the dynamic snapshot should be generated.

-FieldDelimiter field_delimiter

Is the character or character sequence that marks the end of a field in the SQL Server bulk-copy data file. The default is \n<x$3>\n.

-HistoryVerboseLevel [1|2|3]

Specifies the amount of history logged during a snapshot operation. You can minimize the effect of history logging on performance by selecting 1.

HistoryVerboseLevel value
Description
1 Default. Always update a previous history message of the same status (startup, progress, success, and so on). If no previous record with the same status exists, insert a new record.
2 Insert new history records unless the record is for such things as idle messages or long-running job messages, in which case update the previous records.
3 Always insert new records, unless it is for idle messages.

-LoginTimeOut login_time_out_seconds

Is the number of seconds before the login times out. The default is 15 seconds.

-MaxBcpThreads number_of_threads

Specifies the number of bulk copy operations that can be performed in parallel. The maximum number of threads and ODBC connections that exist simultaneously is the lesser of MaxBcpThreads or the number of bulk copy requests that appear in the synchronization transaction in the distribution database. MaxBcpThreads must have a value greater than 0 and has no hard-coded upper limit. The default is 1.

-Output output_path_and_file_name

Is the path of the agent output file. If the file name is not provided, the output is sent to the console. If the specified file name exists, the output is appended to the file.

-OutputVerboseLevel [0|1|2]

Specifies whether the output should be verbose. If the verbose level is 0, only error messages are printed. If the verbose level is 1, all the progress report messages are printed. If the verbose level is 2 (default), all error messages and progress report messages are printed, which is useful for debugging.

-ProfileName profile_name

Specifies an agent profile to use for agent parameters. If ProfileName is NULL, the agent profile is disabled. If ProfileName is not specified, the default profile for the agent type is used.

-PublisherLogin publisher_login

Is the Publisher login name.

-PublisherPassword publisher_password

Is the Publisher password.

-PublisherSecurityMode [0|1]

Specifies the security mode of the Publisher. A value of 0 indicates SQL Server Authentication (default), and a value of 1 indicates Windows Authentication Mode.

-QueryTimeOut query_time_out_seconds

Is the number of seconds before the query times out. The default is 300 seconds.

-ReplicationType [1|2]

Specifies the type of replication. A value of 1 indicates transactional replication, and a value of 2 indicates merge replication.

-RowDelimiter row_delimiter

Is the character or character sequence that marks the end of a row in the SQL Server bulk-copy data file. The default is \n<,@g>\n.

-StartQueueTimeout start_queue_timeout_seconds

Is the maximum number of seconds that the Snapshot Agent waits when the number of concurrent dynamic snapshot processes running is at the limit set by the @max_concurrent_dynamic_snapshots property of sp_addmergepublication. If the maximum number of seconds is reached and the Snapshot Agent is still waiting, it will exit. A value of 0 means that the agent waits indefinitely, although it can be cancelled.

Show:
© 2014 Microsoft