ReplicationTable.ReplicationDropColumn(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes a column from a table that is published in one or more publications.
public:
void ReplicationDropColumn(System::String ^ columnName, System::String ^ schemaChangeScript);
public void ReplicationDropColumn (string columnName, string schemaChangeScript);
member this.ReplicationDropColumn : string * string -> unit
Public Sub ReplicationDropColumn (columnName As String, schemaChangeScript As String)
Parameters
- columnName
- String
The name of the column to be removed.
- schemaChangeScript
- String
A schema change script to propagate to the Subscriber. This is only valid for transactional and snapshot publications. Use null
or empty string if you do not want to specify this parameter.
Remarks
This method is supported for backward compatibility. Use schema change replication when adding columns to or removing columns from a published table. For more information, see Make Schema Changes on Publication Databases.
The ReplicationDropColumn method can only be called by members of the sysadmin fixed server role at the Publisher of by members of the db_owner fixed database role on the publication database.
Calling ReplicationDropColumn is equivalent to executing sp_repldropcolumn (Transact-SQL).