SqlSyncScopeDeprovisioning.DeprovisionTemplate Method
Deprovisions the specified template and all scopes that were created from the specified template by removing all associated synchronization elements from the database.
Namespace: Microsoft.Synchronization.Data.SqlServer
Assembly: Microsoft.Synchronization.Data.SqlServer (in Microsoft.Synchronization.Data.SqlServer.dll)
Syntax
'Declaration
Public Sub DeprovisionTemplate ( _
templateName As String _
)
'Usage
Dim instance As SqlSyncScopeDeprovisioning
Dim templateName As String
instance.DeprovisionTemplate(templateName)
public void DeprovisionTemplate(
string templateName
)
public:
void DeprovisionTemplate(
String^ templateName
)
member DeprovisionTemplate :
templateName:string -> unit
public function DeprovisionTemplate(
templateName : String
)
Parameters
- templateName
Type: System.String
The name of the template to deprovision.
Examples
The following example removes the customertype_template template from a SQL Server database. Removing the template also removes all other scopes that were created from this template.
// Remove the "customertype_template" template from the server database. This also removes all of the
// scopes that depend on the template.
SqlSyncScopeDeprovisioning serverSqlDepro = new SqlSyncScopeDeprovisioning(serverConn);
serverSqlDepro.DeprovisionTemplate("customertype_template");
' Remove the "customertype_template" template from the server database. This also removes all of the
' scopes that depend on the template.
Dim serverSqlDepro As New SqlSyncScopeDeprovisioning(serverConn)
serverSqlDepro.DeprovisionTemplate("customertype_template")
See Also
Reference
SqlSyncScopeDeprovisioning Class
Microsoft.Synchronization.Data.SqlServer Namespace
Other Resources
How to: Filter Data for Database Synchronization (SQL Server)
How to: Provision and Deprovision Synchronization Scopes and Templates (SQL Server)