共用方式為


TransPublication.CopySnapshot(String, String, String) Method

Definition

Copies the latest snapshot files for a specific subscription to a destination folder.

public:
 void CopySnapshot(System::String ^ destinationFolder, System::String ^ subscriber, System::String ^ subscriptionDB);
public void CopySnapshot (string destinationFolder, string subscriber, string subscriptionDB);
member this.CopySnapshot : string * string * string -> unit
Public Sub CopySnapshot (destinationFolder As String, subscriber As String, subscriptionDB As String)

Parameters

destinationFolder
String

A String that specifies the destination directory path.

subscriber
String

A String value that represents the name of the Subscriber to which subscription belongs.

subscriptionDB
String

A String value that represents the subscription database name.

Remarks

The CopySnapshot method can only be called by members of the sysadmin fixed server role at the Publisher or by members of the db_owner fixed database role on the publication database.

Calling CopySnapshot is equivalent to executing sp_copysnapshot (Transact-SQL).

Applies to