You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/Copy-DbaDbTableData.ps1
+27-6Lines changed: 27 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,11 @@ function Copy-DbaDbTableData {
127
127
Creates new tables using the destination database's default filegroup instead of matching the source table's filegroup name.
128
128
Use this when the destination database has different filegroup configurations or when you want all copied tables in the PRIMARY filegroup.
129
129
130
+
.PARAMETERScriptingOptionsObject
131
+
A scripting options object created by New-DbaScriptingOption that controls how the destination table is scripted when -AutoCreateTable is used.
132
+
Use this to control which table properties are included in the CREATE TABLE script, such as indexes, constraints, triggers, and extended properties.
133
+
When specified, this takes precedence over -UseDefaultFileGroup. Use New-DbaScriptingOption to create the object and set the desired properties.
134
+
130
135
.OUTPUTS
131
136
PSCustomObject
132
137
@@ -230,6 +235,15 @@ function Copy-DbaDbTableData {
230
235
231
236
Copies all data from [tempdb].[dbo].[vw1] (3-part name) view on instance sql1 to an auto-created table [SampleDb].[SampleSchema].[SampleTable] on instance sql1
Copies all data from dbo.MyTable in db1 on sql1 to an auto-created table on sql2, scripting the destination table with all constraints, indexes, and using the default filegroup.
246
+
233
247
.EXAMPLE
234
248
PS C:\> $params = @{
235
249
>> SqlInstance = "SERVER001"
@@ -273,6 +287,7 @@ function Copy-DbaDbTableData {
0 commit comments