title: How migrate data safely using BCP and format files with SQL Server 2008?
body: <p>Are there potential issues using BCP to migrate data after updating table structures ?</p>
  <p>If I use this process, will I face data loss?</p>
  <p>Export data :</p>
  <pre><code>bcp MYDATABASE.dbo.MyTable OUT c:\myPath\MyTable.bcp -T -N
  </code></pre>
  <p>Create format file to bulk import after changing structure from NCHAR(255) to NVARCHAR(MAX) and skipping some columns :</p>
  <pre><code>bcp MYDATABASE.dbo.MyTable format nul -T -N -f c:\myPath\formatfiles\MyTable.fmt
  </code></pre>
  <p>(Open MyTable.fmt and change data type + skip some columns with this method :
  <a href="https://docs.microsoft.com/en-us/previous-versions/sql/sql-server-2008/ms179250(v=sql.100)#methods-for-modifying-a-non-xml-format-file" rel="nofollow noreferrer">SQL Server Docs</a>)</p>
  <p>Then reimport data with :</p>
  <pre><code>bcp MYDATABASE.dbo.MyTable IN c:\myPath\MyTable.bcp -f c:\myPath\formatfiles\MyTable.fmt -T -N
  </code></pre>