Applies To: SQL Server 2016 Preview
Gets or sets the Boolean property value that specifies whether dependency relationships that are defined in primary keys which have enforced declarative referential integrity are included in the script.
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Scripting is directed to consider dependency relationships that have been established by declarative referential integrity.
Legacy Code Example
The following code example specifies that dependency relationships defined in primary keys which have enforced declarative referential integrity are scripted.
Dim scOps As New ScriptingOptions() scOps.DriPrimaryKey = true
$scOps = New-Object Microsoft.SqlServer.Management.Smo.ScriptingOptions $scOps.DriPrimaryKey = $TRUE