<p>I'm attempting to make a DTS package to transfer data between two databases on the same server and I'm getting the following errors. Iv read that the Multiple-step OLE DB operation generated error can occur when you are transferring between different database types and there is loss of precision, but this is not that case here. How do I examine the column meta data?</p>

<blockquote>
  <p>Error: 0xC0202009 at Data Flow Task,
  piTech [183]: An OLE DB error has
  occurred. Error code: 0x80040E21. An
  OLE DB record is available.  Source:
  "Microsoft SQL Native Client" 
  Hresult: 0x80040E21  Description:
  "Multiple-step OLE DB operation
  generated errors. Check each OLE DB
  status value, if available. No work
  was done.".</p>
  
  <p>Error: 0xC0202025 at Data Flow Task,
  piTech [183]: Cannot create an OLE DB
  accessor. Verify that the column
  metadata is valid.</p>
  
  <p>Error: 0xC004701A at Data Flow Task,
  DTS.Pipeline: component "piTech" (183)
  failed the pre-execute phase and
  returned error code 0xC0202025.</p>
</blockquote>

[{'answer_id': 51606, 'author': 'Michael Prewecki', 'author_id': 4403, 'author_profile': 'https://Stackoverflow.com/users/4403', 'pm_score': 0, 'selected': False, 'text': '<p>You can use <code>SELECT * FROM INFORMATION_SCHEMA.COLUMNS</code> but I suspect you created the destination database from a script of the source database so it is very likely that they columns will be the same.</p>\n\n<p>Some comparisons might bring something up though.</p>\n\n<p>These sorts of errors sometimes come from trying to insert too much data into varchar columns too.</p>\n'}, {'answer_id': 52032, 'author': 'Michael Prewecki', 'author_id': 4403, 'author_profile': 'https://Stackoverflow.com/users/4403', 'pm_score': 2, 'selected': False, 'text': '<p>This query should identify columns that are potential problems...</p>\n\n<pre><code>SELECT * \nFROM [source].INFORMATION_SCHEMA.COLUMNS src\n    INNER JOIN [dest].INFORMATION_SCHEMA.COLUMNS dst \n        ON dst.COLUMN_NAME = src.COLUMN_NAME\nWHERE dst.CHARACTER_MAXIMUM_LENGTH &lt; src.CHARACTER_MAXIMUM_LENGTH \n</code></pre>\n'}, {'answer_id': 2628382, 'author': 'DON', 'author_id': 315310, 'author_profile': 'https://Stackoverflow.com/users/315310', 'pm_score': 0, 'selected': False, 'text': '<p>I had a similar issue when i was transferring data from an old database to a new database, I got the error above. I then ran the following script</p>\n\n<p><code>SELECT * FROM [source].INFORMATION_SCHEMA.COLUMNS src INNER JOIN [dest].INFORMATION_SCHEMA.COLUMNS dst ON dst.COLUMN_NAME = src.COLUMN_NAME WHERE dst.CHARACTER_MAXIMUM_LENGTH &lt; src.CHARACTER_MAXIMUM_LENGTH</code></p>\n\n<p>and found that my columns where slightly different in terms of character sizes etc.\nI then tried to alter the table to the new table structure which did not work. I then transferred the data from the old database into Excel and imported the data from excel to the new DB which worked 100%.</p>\n'}, {'answer_id': 7619803, 'author': 'Anïs El Haouéli', 'author_id': 974291, 'author_profile': 'https://Stackoverflow.com/users/974291', 'pm_score': 5, 'selected': False, 'text': "<p>Take a look at the fields's proprieties (type, length, default value, etc.), they should be the same.</p>\n\n<p>I had this problem with SQL Server 2008 R2 because the fields's length are not equal.</p>\n"}, {'answer_id': 13016559, 'author': 'Oliphant', 'author_id': 1766101, 'author_profile': 'https://Stackoverflow.com/users/1766101', 'pm_score': 4, 'selected': False, 'text': '<p>This error is common when the source table contains a TEXT column and the target is anything other than a TEXT column. It can be a real time-eater if you have not encountered (or forgot!) this before.  </p>\n\n<p>Convert the text column to string and set the error condition on truncation to ignore.  this will usually serve as a solution for this error. </p>\n'}, {'answer_id': 17868210, 'author': 'polrbar5', 'author_id': 2620395, 'author_profile': 'https://Stackoverflow.com/users/2620395', 'pm_score': -1, 'selected': False, 'text': '<p>This error will also occur when trying to do an insert and a field is coded not null and nulls are trying to be inserted.</p>\n'}, {'answer_id': 33577559, 'author': 'normalo', 'author_id': 5535487, 'author_profile': 'https://Stackoverflow.com/users/5535487', 'pm_score': -1, 'selected': False, 'text': '<p>I hade this error when transfering a csv to mssql\nI converted the columns to DT_NTEXT and some columns on mssql where set to nvarchar(255).</p>\n\n<p>setting them to nvarchar(max) resolved it.</p>\n'}, {'answer_id': 44588839, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': "<p>Also check if the script has no batch seperator commands (remove the 'GO' statements on a single line).</p>\n"}, {'answer_id': 44671675, 'author': 'Herve Mutombo', 'author_id': 7647224, 'author_profile': 'https://Stackoverflow.com/users/7647224', 'pm_score': 2, 'selected': False, 'text': '<p><code>\'-2147217887\' message \'IDispatch error #3105\' source \'Microsoft OLE DB Service Components\' description \'Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.\'."</code></p>\n\n<p>This is what I was also facing. The problem came from the fact that I changed my SQLOLEDB.1 provider to SQLNCLI11 <em>without</em> mentioning the compatibility mode in the connection string.\nWhen I set this <code>DataTypeCompatibility=80;</code> in the connection string, I got the problem solved.</p>\n'}, {'answer_id': 45504832, 'author': 'jagadish ganaparthi', 'author_id': 8416886, 'author_profile': 'https://Stackoverflow.com/users/8416886', 'pm_score': 2, 'selected': False, 'text': '<p>This issue will come mostly due to empty rows at the end of the file, remove those and run the job.</p>\n'}, {'answer_id': 52726542, 'author': 'Roi-Kyi Bryant', 'author_id': 1582419, 'author_profile': 'https://Stackoverflow.com/users/1582419', 'pm_score': 1, 'selected': False, 'text': '<p>For me the answer was that I was passing two parameters to and execute SQL task, but only using one. I was doing some testing and commented out a section of code using the second parameter. I neglected to remove the parameter mapping.</p>\n\n<p>So ensure you are passing in the correct number of parameters in the parameter mapping if you are using the Execute SQL task.</p>\n'}, {'answer_id': 59750512, 'author': 'Artemination', 'author_id': 2363834, 'author_profile': 'https://Stackoverflow.com/users/2363834', 'pm_score': 0, 'selected': False, 'text': '<p>In my case, the problem was setting the variable of the Execute SQL Task, in parameters mapping the parameter name, (in OLEDB must be the position of the parameter that you call in the stored procedure), I had 1, but the first parameter starts in 0, so I changed it and voilá!</p>\n'}, {'answer_id': 72013121, 'author': 'Ravi', 'author_id': 4478353, 'author_profile': 'https://Stackoverflow.com/users/4478353', 'pm_score': 0, 'selected': False, 'text': "<p>check if you have written GO statement in your query. If it's there then try to remove it.</p>\n<pre><code>drop table if exists Employee\nGO\n</code></pre>\n<p>If should be only</p>\n<pre><code>drop table if exists Employee\n</code></pre>\n"}]
['https://Stackoverflow.com/questions/51589', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/230/']