Lesson Learned #281: Export fails due to system out of memory exception

Posted by

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .

We found today an out of memory exception raised by SQL Server Management Studio exporting a database. This exception may occurs because, for performance improvement the export process, this process uses memory to extract schema model and depending how large is your schema objects definition, for example, how many tables, contraints, indexes, etc.. you could reach this error message. 


To avoid this specific exception, using the parameter /p:Storage=File with SqlPackage redirect the backing storage for the schema model used during extraction to storage instead of memory. Use the following command line to include /p:Storage=File - sqlpackage.exe /Action:Export /ssn:tcp:<ServerName>.database.windows.net,1433 /sdn:<DatabaseName> /su:<UserName> /sp:<Password> /tf:<TargetFile> /p:Storage=File


Also, you could find more information here



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.