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 Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

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