Table rebuild in sql compare13 with TEXTIMAGE_ON
Varahalubabu
Posts: 7 New member
in SQL Compare
Table rebuild is happening when TEXTIMAGE_ON is there in the table creation statement
if source and target have different file groups. It is happening in SQL Compare13 but not in SQL Compare12 even if i use ifg option in sync step.
It is stopping us to setup automate deployments for DB. Can any one help us on this.
Script in Source:
CREATE TABLE [dbo].[MANAGE_FIELD_LABEL_NAME](
[FIELD_LABEL_ID] [BIGINT] IDENTITY(1,1) NOT NULL,
[FIELD_LABEL_NAME] [NVARCHAR](200) NULL,
[FIELD_DESCRIPTION] [VARCHAR](3000) NULL,
[FIELD_KEY] [NVARCHAR](MAX) NULL,
[FIELD_DESCRIPTION_TEST] [VARCHAR](100) NULL,
CONSTRAINT [PK_MANAGE_FIELD_LABEL_NAME_FIELD_LABEL_ID] PRIMARY KEY CLUSTERED
(
[FIELD_LABEL_ID] ASC
)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
Script in Target:
CREATE TABLE [dbo].[MANAGE_FIELD_LABEL_NAME](
[FIELD_LABEL_ID] [BIGINT] IDENTITY(1,1) NOT NULL,
[FIELD_LABEL_NAME] [NVARCHAR](200) NULL,
[FIELD_DESCRIPTION] [VARCHAR](3000) NULL,
[FIELD_KEY] [NVARCHAR](MAX) NULL,
CONSTRAINT [PK_MANAGE_FIELD_LABEL_NAME_FIELD_LABEL_ID] PRIMARY KEY CLUSTERED
(
[FIELD_LABEL_ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [FG_Test]
) ON [FG_Test] TEXTIMAGE_ON [FG_Test]
I have used following command line syntax to replicate this.
C:\Program Files (x86)\Red Gate\SQL Compare 13>SQLCompare.exe /transactionIsolationLevel:SERIALIZABLE /exclude:Additional /scriptFile:"D:\Work\Office\SQL\RedGate\SqlComapre\CommandLine\WithoutOption\TESTFG\CompleteMigrateSql.sql" /showWarnings /report:"D:\Work\Office\SQL\RedGate\SqlComapre\CommandLine\WithoutOption\TESTFG\isa2y4hu.xml" /reportType:Xml /assertidentical /force /OutputWidth:1024 /scripts1:"D:\RedGateRandD\RedGateScript" /server2:AHS-LP-196 /database2:SyncDB /out:"D:\Work\Office\SQL\RedGate\SqlComapre\CommandLine\WithoutOption\TESTFG\qua10g3s.log" /options:adus,we,cs,cfgps,dp2k,drd,nc,dacia,ib,icc,ict,ich,ic,icm,icn,idsn,idc,ie,ifg,if,ift,iip,isi,ii,iilp,iit,ik,ims,infr,ipi,ip,iq,isoa,isb,ist,isn,iscn,itst,iup,iw,iweo,iwe,iwn,nacm,oec,ucl
Tagged:
Answers
What is the full version number of SQL Compare V13 you are using? Also the full version number of the SQL Compare V12 you are or were using (if known)?
I ask the above question, as a similar problem was resolved in V13.1.10.5564 back in January 2018.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Because of this issue we could not able to take decision on DB Sync automation.
I have tested in SQL Compare v13.6.4.8.8181 and SQL Compare v12.3.3.4490
Result of SQL Compare v12.3.3.4490 :
For above results i have used below command line syntax:
C:\Program Files (x86)\Red Gate\SQL Compare 12>SQLCompare.exe /transactionIsolationLevel:SERIALIZABLE /include:staticData /exclude:Additional /scriptFile:"D:\Work\Office\SQL\RedGate\SqlComapre\CommandLine\WithoutOption\TESTFG\CompleteMigrateSql.sql" /showWarnings /include:Identical /report:"D:\Work\Office\SQL\RedGate\SqlComapre\CommandLine\WithoutOption\TESTFG\isa2y4hu.xml" /reportType:Xml /assertidentical /force /OutputWidth:1024 /scripts1:"D:\RedGateRandD\RedGateScript" /server2:AHS-LP-196 /database2:SyncDB /out:"D:\Work\Office\SQL\RedGate\SqlComapre\CommandLine\WithoutOption\TESTFG\qua10g3s.log" /options:cfgps,dp2k,nc,f,icc,idsn,IgnoreTSQLT,iu,IgnoreUserProperties,iw,iweo,incd,tofpf,ucl,ifg
Result of SQL Compare v13.6.4.8.8181 :
/*
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -ExecutionPolicy Bypass -File "D:\RedGateRandD\Docs\RedGateLib\SqlChangeAutomationRunner.ps1" sync -databaseUserName user1 -databaseServer AHS-LP-196 -options "ifg" -transactionIsolationLevel Serializable -package \RedGateRandD\RedGateScript -databaseName SyncDB -databasePassword @pword@ -scriptFile \Work\Office\SQL\RedGate\SqlComapre\CommandLine\WithoutOption\TESTFG\CompleteMigrateSql.sql -RequiredProductVersion latest
I can reproduce this error.
I am not convinced that the TEXTIMAGE_ON keyword is the cause of the problem. I created a second copy of the table omitted TEXTIMAGE_ON and still experience the table rebuild process in the deployment script.
Sadly my test system does not have SQL Compare V12 to test against. I will continue investigating and let you know my observations and results.
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Thank you for your response.
If we use Ignorefilegroup option it doesn't rebuild if we omit TEXTIMAGE_ON keyword in script.
Can you check the script files which i have used for this issue in above comments. If source and target doesn't have any changes except file group even if script has TEXTIMAGE_ON keyword table rebuild doesn't happen.
Now add new column in to table in the source trying to sync you can see table rebuild.
For your reference you can use above scripts to replicate the scenario.
I have continued to investigate this problem.
Using V12.3.3.4490:
If the Ignore Filegroup, partition schemes and partition functions option is enabled, there is no table rebuild.
If the Ignore Filegroup, partition schemes and partition functions option is disabled, the table rebuild takes place due to the differences in the Filegroup names on which the table is created upon and in the GUI a warning message occurs that a table rebuild is required.
Using 13.7.4.9637:
If the Ignore Filegroup, partition schemes and partition functions option is enabled, a table rebuild occurs in the deployment script but there is no warning that this action is going to occur.
If the Ignore Filegroup, partition schemes and partition functions option is disabled, the table rebuild takes place due to the differences in the Filegroup names on which the table is created upon and a warning occurs that a table rebuild is required.
Therefore I have submitted Bug Report SC-10437 due to the behaviour I found. I will update when I have further news.
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com