title: How to insert xml file into xml field using bcp?
body: <p>I have a table:</p>
  
  <pre><code>USE [testdb]
  GO
  
  CREATE TABLE [dbo].[a](
      [n] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED,
      [x] [xml] NULL)
  GO
  </code></pre>
  
  <p>How to insert xml file into field x from client?
  <a href="https://msdn.microsoft.com/en-us/library/ms191184(v=sql.110).aspx" rel="nofollow">MSDN Example</a> doesn't suit me.</p>
  
  <pre><code>    INSERT INTO T(XmlCol)
  SELECT * FROM OPENROWSET(
     BULK 'c:\SampleFolder\SampleData3.txt',
     SINGLE_BLOB) AS x;
  </code></pre>
  
  <p>I'm not the administrator of this server. And I have the only access to the database. I can not put a file in a directory on the server. I can use the BCP and other tools to access the database</p>
  
  <p>XML file is very large (> 50 MB), so it doesn't turn to insert the text of file as a constant in the query SSMS</p>