I'm trying to use the Generate Scripts tool to export my database so I can move it to 2008 R2. It is currently on 2012 so backing up and restoring won't work. The database is and has been in 2008 compatibility mode.
I can export the schema with no problems but when I try to export the data I get something like this:
"Microsoft.SqlServer.Management.SqlScriptPublish.SqlScriptPublishException: An error occurred while scripting the objects. ---> System.Data.SqlClient.SqlException: Invalid column name 'ID'. Invalid column name 'Message'. Invalid column name 'DateSubmit'. .......................................
Here is the thing when I first ran it failed with this message on my Stats_UserCount table. So I decided to exclude that table from the export. It still fails with the EXACT same message but on a different table!!!
What is going on with this? I did notice on my "SysMessages" table I cannot seem to bring up the design. It causes the management studio to crash. I have verified that this is the only table doing this.
I'm going to try to just exclude this table