DEV Community

Cover image for How to fix a partition issue in a bacpac backup
Antoine
Antoine

Posted on

1

How to fix a partition issue in a bacpac backup

Photo by Emmanuel Ikwuegbu on Unsplash

In order to fix it, we need to perform 6 steps:

  • rename the .bacpac file to .zip extension
  • extract model.xml and origin.xml
  • open model.xml and change the entry
                <Entry>
                    <Element Type="SqlPartitionValue">
                        <Property Name="ExpressionScript">
                            <Value><![CDATA[NULL]]></Value>
                        </Property>
                    </Element>
                </Entry>
Enter fullscreen mode Exit fullscreen mode

to

                <Entry>
                    <Element Type="SqlPartitionValue">
                        <Property Name="ExpressionScript">
                            <Value><![CDATA[CAST(NULL AS DATETIME2)]]></Value>
                        </Property>
                    </Element>
                </Entry>
Enter fullscreen mode Exit fullscreen mode
  • Save, and compute the new checksum using Powershell cmdlet Get-FileHash:
Get-FileHash -Algorithm 256 model.xml
Enter fullscreen mode Exit fullscreen mode
  • write the checksum in origin.xml to replace previous model.xml checksum
  • Put back files model.xml and origin.xml in zip

Hope it helps !

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay