title: For xml query not creating xml file in SQL Server 2016
body: <p>I have created a SSIS package which functions in following manner:</p>
  
  <ol>
  <li><p>Pick a <code>.csv</code> file from DFS location separate out error records and put error records in DFS path error folder as <code>.csv</code> file.</p></li>
  <li><p>Proceed with the correct records and dump them into a database, where for XML query is used to create a XML file and store again in the DFS location.</p></li>
  </ol>
  
  <p>To summarize:</p>
  
  <p>Picks csv, generates (error records) csv and xml (correct data).</p>
  
  <p>Issue:</p>
  
  <p>My package is working fine locally creating both csv and xml files in the DFS location but when deployed on SQL Server 2016, only csv is getting created but not xml.. even logs does not show any error.</p>
  
  <p>I tried these steps as a solution:</p>
  
  <ol>
  <li>Checked I have all the access to DFS location </li>
  <li>Created proxy account having database and DFS permissions </li>
  <li>Created SQL Server Agent job and executed the package on server</li>
  <li>Changed SQL Server configurations of DFS path to see anything wrong with configurations</li>
  </ol>
  
  <p>Major concerns: </p>
  
  <ol>
  <li><p>My package works fine locally creating both csv and xml.</p></li>
  <li><p>Also I created the same environment of database tables which are used by my package in SQL Server 2012. Deployed it and ran through SQL Server Agent job and it worked correct creating both csv and xml.</p></li>
  <li><p>I even created a dummy package having <code>select * from abc for xml raw</code> and deployed on both servers 2012 and 2016 and again it created XML for 2012 but not for 2016.</p></li>
  </ol>
  
  <p>I am not sure what is the issue, is it database access issue, DFS permissions, proxy accounts or SQL Server versions.</p>