Get-CDSyncScript

From PowerGUI Wiki

Jump to: navigation, search

Gets synchronization script for two databases.

Contents

Syntax

Get-CDSyncScript [-Source] <PSObject> [-Target] <CDDatabase> [-ScriptConstraintsWithNoCheck] [-TruncateData] [-ReplaceNotNullWithNull] [-ScriptNotNullWithConstant] [-IgnoreInvalidObjects] [-IgnoreConstraintNames] [-IgnoreColumnOrder] [-IgnoreIdentity] [-IgnoreFillFactor] [-Exclude [<String[]>]] [-Include [<String[]>]] [-ExcludeTypes [<String[]>]] [-IncludeTypes [<String[]>]] [<CommonParameters>]

Detailed Description

Gets synchronization script for two databases with specified options.



Related Commands

Parameters

Name Description Required? Pipeline Input Default Value
Source Source object (CDDatabase or CDSnapshot object) true false
Target Target server (CDDatabase object) true false
ScriptConstraintsWithNoCheck Script constraint with NoCheck false false
TruncateData Truncate data false false
ReplaceNotNullWithNull Replace NOT NULL with NULL false false
ScriptNotNullWithConstant Script NOT NULL with constant false false
IgnoreInvalidObjects Ignore invalid objects false false
IgnoreConstraintNames Ignore constraint names false false
IgnoreColumnOrder Ignore column order false false
IgnoreIdentity Ignore identity false false
IgnoreFillFactor Ignore fill factor false false
Exclude Exclude objects patterns. This parameter has less priority then Include parameter. Wildcards are allowed. false false
Include Include objects patterns. This parameter has more priority then Exclude parameter. Wildcards are allowed. false false
ExcludeTypes Types for exclude from synchronization script. Other types will be ignored. Can be one of these values Table, View, User, Role, Schema, Procedure, CLRProcedure, Function, CLRFunction, Type, CLRType, Rule, Default, DDLTrigger, DDLCLRTrigger, XMLSchemaCollection, Assembly, PartitionFunction, PartitionScheme, Synonym, Aggregate false false
IncludeTypes Types for include in synchronization script. Other types will be ignored. Can be one of these values Table, View, User, Role, Schema, Procedure, CLRProcedure, Function, CLRFunction, Type, CLRType, Rule, Default, DDLTrigger, DDLCLRTrigger, XMLSchemaCollection, Assembly, PartitionFunction, PartitionScheme, Synonym, Aggregate false false

Return Values

string

Examples

Example 1

$a=Get-CDDatabase hostname base1
$b = Get-CDDatabase server base1
get-cdsyncscript $a $b -IgnoreConstraintNames

Synchronization script will be returned with option IgnoreConstraintNames set to true.

Personal tools