title: Prevent SqlPackage from writing to primary partition during Export
body: <p>To move a 144GB SQL Server database to Azure SQL I want to export it to the .bacpac format. </p>
  
  <p>To do so I use SQL Package of SQL Version 130:</p>
  
  <pre><code>C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin&gt;SqlPackage.exe /Action:Export /ssn:MY_MSSQL_INSTANCE /sdn:MY_DATABASE /tf:d:\export.bacpac /p:Storage=file
  </code></pre>
  
  <p>However, this fails because my primary partition (C:, with 39GB free) runs out of disk space during the operation. As you can see in the command I try to export to D:. It seems the export script does something temporary on C:. </p>
  
  <p>How can I prevent that? (I already checked the default SQL Server Temp path, it's also on D:)</p>