DistributionPublication.Script(ScriptOptions) Method

Definition

Generates a Transact-SQL script that can be used to create or remove the publication metadata at the Distributor.

public:
 System::String ^ Script(Microsoft::SqlServer::Replication::ScriptOptions scriptOption);
public string Script (Microsoft.SqlServer.Replication.ScriptOptions scriptOption);
member this.Script : Microsoft.SqlServer.Replication.ScriptOptions -> string
Public Function Script (scriptOption As ScriptOptions) As String

Parameters

scriptOption
ScriptOptions

A ScriptOptions value that specifies the scripting options.

Returns

A String value that is the script.

Remarks

You should not call the Script method. To generate a creation or deletion script for a transactional or snapshot publication, you should instead call the Script method on the TransPublication object.

The scriptOption parameter determines whether to return a creation script or a deletion script.

Applies to