Scripting Tables, Views and Other Database Objects from SQL Server 2005 Database to SQL Server 2000

If you need to copy table structures between different versions of SQL Server, here is the trick to get the correct scripts.  If you simply generate the scripts by right clicking and then clicking "Script Table as" you'll get the SQL Server 2005 TSQL which Sql Server 2000 with choke on (It won't recognize the new fancy stuff in 2005).

To work around that use the following method.

In Microsoft Sql Server Management Studio:

 

  1. Select your Database in the Object Explorer
  2. Right Click, to get your context menu and choose: Task -> Generate Scripts...  ( this is the only one I know if this will work on )
  3. Click the Next button
  4. Select your DB from the list
  5. About Halfway down the options list set "Script for Server Version" to "SQL Server 2000"
  6. Next...
  7.  Select your DB objects and generate your scripts

 

 The resulting script will work in Sql Server 2000.

From:  http://social.msdn.microsoft.com/Forums/en-US/sqldocumentation/thread/98e3445d-50e3-41e1-9ee4-f79d22aedb8d

By:  WickedMonkey

 

 

About

[Insert Witty Saying Here]