title: How to alter a large Azure table without timeout
body: <p>I am trying to alter a field definition in a large Azure table (20 Gb, 500M+ records) </p>
  
  <p>from <strong>nvarchar(max)</strong> to <strong>nvarchar(16)</strong> using </p>
  
  <pre><code>ALTER TABLE [dbo].[MyTable] ALTER COLUMN [MyField] [nvarchar](16)
  </code></pre>
  
  <p>but I cannot find a way to execute this command without running into a timeout. From Visual Studio and SQL Server Management Studio I get a </p>
  
  <p><em>Msg 10054, Level 20, State 0, Line 0
  A transport-level error has occurred when receiving results from the server. 
  (provider: TCP Provider, error: 0 - An existing connection was forcibly 
  closed by the remote host.)</em></p>
  
  <p>after about 30 min. When I run the command from the Azure Management Portal after a few minutes I get :</p>
  
  <p><em>Msg -2, Level 11, State 0, Line 0
  Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.</em></p>
  
  <p><strong>How can such a long running query be executed on SQL Azure?</strong></p>