3

Hi I am using the copy wizard in studio 2008 r2.

I am using the Management Objects method, as I cannot take the database offline.

The copy fails with the follwing error :

Event Name: OnError Message: ERROR : errorCode=0 description=Invalid column name 'Organisation'. helpFile= helpContext=0 idofInterfaceWithError={C81DFC5A-3B22-4DA3-BD3B-10BF861A7F9C} StackTrace: at Microsoft.SqlServer.Management.Dts.DtsTransferProvider.ExecuteTransfer() at Microsoft.SqlServer.Management.Smo.Transfer.TransferData() at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer() Operator: NT AUTHORITY\SYSTEM Source Name: CDW_SQL_SQL_5 Source ID: {8EF4C2A1-3B69-4729-8569-091F9B4863CB} Execution ID: {61878ECA-D8C4-441A-9988-53ECC75D9283} Start Time: 25/09/2012 15:53:34 End Time: 25/09/2012 15:53:34 Data Code: 0

However it does not tell me what object the Column is on. What is the most reasonable way for me to locate this column based on the error output?

Gavin
  • 2,153
  • 2
  • 25
  • 35
  • 2
    How many tables do you have with the column `Organisation` in them? – D'Arcy Rittich Sep 25 '12 at 15:11
  • Just found the following which will help me find that answer. http://blog.sqlauthority.com/2008/08/06/sql-server-query-to-find-column-from-all-tables-of-database/ Is this more likely to be a constraint as a table surely cant have an invalid column name? It either has it or is doesnt. Or am wrong? – Gavin Sep 25 '12 at 15:16
  • Only 3 tables, not such a terrible task! – Gavin Sep 25 '12 at 15:17
  • Rethinking my first comment could a View be a contender? – Gavin Sep 25 '12 at 15:18
  • 2
    Possibly, if they are indexed. – D'Arcy Rittich Sep 25 '12 at 15:19
  • Very useful post for me. Find columns used by Views: http://stackoverflow.com/questions/4244962/find-which-views-if-any-a-field-is-used-in-using-dependencies – Gavin Sep 25 '12 at 15:28
  • I have 3 tables and 2 views containing the column - all can be selected, designed, and contraints either dont exist or check ok. :( – Gavin Sep 25 '12 at 15:32

0 Answers0