SQL Compare cannot transfer correctly PERIOD FOR SYSTEM_TIME and HIDDEN attributes
Ivailo
Posts: 7 New member
in SQL Compare
Hello support team,
I am trying to transfer changes from lower environment to the next environment. Unfortunately PERIOD FOR SYSTEM_TIME and HIDDEN attributes are not transferred correctly.
PERIOD FOR SYSTEM_TIME is transferred after the table changes are transferred. HIDDEN attribute cannot be transferred at all. There is an error in the statement SQL Compare produces.
Step to reproduce the issue:
Create table in Env1 with PERIOD FOR SYSTEM_TIME and HIDDEN attributes on the period columns.
Create the same table in Env2 (they should be exactly the same). Remove PERIOD FOR SYSTEM_TIME on the table in Env2.
Compare and try to sync Env1 and Env2. You should be able to see the issues.
Please tell me how to sync environments if I am missing something?
I am trying to transfer changes from lower environment to the next environment. Unfortunately PERIOD FOR SYSTEM_TIME and HIDDEN attributes are not transferred correctly.
PERIOD FOR SYSTEM_TIME is transferred after the table changes are transferred. HIDDEN attribute cannot be transferred at all. There is an error in the statement SQL Compare produces.
Step to reproduce the issue:
Create table in Env1 with PERIOD FOR SYSTEM_TIME and HIDDEN attributes on the period columns.
Create the same table in Env2 (they should be exactly the same). Remove PERIOD FOR SYSTEM_TIME on the table in Env2.
Compare and try to sync Env1 and Env2. You should be able to see the issues.
Please tell me how to sync environments if I am missing something?
Tagged:
Answers
Thanks for reaching out to Redgate Support. I would like to test this, but for the sake of consistently, could you please provide the creation script you used where you saw this behavior? I did some sample testing on my end but was not getting an error.
Best,
Support
Ok, I will try to explain how to reproduce the issue in more detail with an example:
I think the correct command should be:
I will try to repost tomorrow.
Ok, I will try to explain how to reproduce the issue in more detail with an example:
(excuse me, but I will post step by step to avoid problems)
3. Apply some changes to the table. For example with SQL Management Studio insert a new column [AddedColumn] between [Description] and [sysValidFrom] in DB1.dbo.DemoTable and fix PERIOD and HIDDEN manually. Like the following simplified script:
Everything is correct.
Deploy changes with SQL Compare.
Everything should be transferred, but...
5. Compare again. Unfortunately PERIOD and HIDDEN attributes are missing in DB2.
OK, deploy again with SQL Compare.
6. Compare again. Should see PERIOD is transferred but HIDDEN attribute is missing.
Ok, deploy again with SQL Compare.
Now you should see the error:
Appreciate the extensive write up, I am going to look over this shortly and test the steps again in my lab environment. Once I confirm the issue I will let you know some next steps to try.
Was able to replicate this issue while utilizing the latest version of SQL Compare. Going to shoot this up to development and will circle back here and let you know next steps.
This issue has been logged as a bug by Development and is currently being worked on. Once work has concluded and I have next steps or a remediation available for you, I will circle back here an update you further.
Cheers,
Christian Perez