When trying to reverse engineer a SQL Server 2000 database, receive error
An old table that didnt conform to new SQL Server naming standards. The first character of the table name was a single quote (apostrophe). Traced the SQL generated by TOAD Data Modeler, and found that this character in the table name caused the quotes in the generated SQL to not match up, therefore part of the table name was interpreted as an SQL command. The table was dropped and that solved the problem.
How to quickly verify it: Open the RE Wizard | step Options and clear the checkbox Load Description for Tables and Columns. If the problem doesnt occur this time, there is definitely a problem in any table/column description, possibly some nonstandard character or anything in your database.
How to find out which table/column description is the cause of the problem: 1. Please find attached a system package that we modified a little. 2. Find location where the TDM system packages are stored. Default location is: C:\Program Files\Quest Software\Toad Data Modeler 3\Packages\System
3. Find package OREDBMS2K.txg. Back up this package before you replace it with the attached one. 4. Copy the attached package to the location. 5. Open TDM and run RE once again (with the checkbox Load Description for Tables and Columns selected). 6. Take notice of the Log area - during RE, names of tables and SQL will be written out. The last table, that will be written out before the error appears, is the table where the problem exists (or the last SQL before the error appears will be the problematic SQL). Please check out the name of the table, description etc. if there is any nonstandard character - please make correction.