title: Deploying SQL DB To Azure Timeout Enabling Indexes
body: <p>We have a project we are hosting in Azure, we have our SQL servers stored in an elastic pool. The database we have is generated from Code First migrations from the .NET framework; and we load the data into the database with some SQL import scripts.</p>
  <p>The issue comes into deploying the database to the Azure. We have tried using SQL Server Management Studio on a dev machine and on the sql server. We have attempted to push the database to Azure using the Deploy Database to Microsoft SQL Azure, and attempted to connect directly to the Azure and Import Data Tier Application using a BACPAC. SQL server 2014 12.0.4439.1 is our server version.</p>
  <p>During the deployment process everything seems to go very quickly and the schema is created, data is loaded into the tables, but it hangs on &quot;Enabling Indexes&quot; for most of the process time and at about an hour the entire process times out and fails. I receive 3 errors; the first was error 0; something very cryptic about database files targeting SQL server 2014 having known compatibility with SQL azure v12. Another about a timeout, with a generic message that the process has timed out. The final error is a comment</p>
  <pre><code>Could not import package.
  Error SQL72016: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
  The statement has been terminated.
  Error SQL72045: Script execution error.  The executed script:
  
  Bulk data is loaded
  </code></pre>
  <p>After doing some research I saw a few others complaining that if the basic tier is used that there are not enough DTU's for the process to run within the time limit. We are using the Standard 1 tier for our database and have tried upping it to S2 for the import process as a test. While things seemed to happen faster we had the same issue. Database is 1.6 gigs and does have 2 large tables with ~1 mill rows; though I do not see this as being such a large database that this process should fail.</p>