Wednesday, March 21, 2012

Generating Scripts at the database level

Hi All,

I require to compare two database structures.This is what I went for:

I generated scripts (right click on the database --> All Tasks--> Generate Scripts) for all tables in the two given databases and compared them.

The problem is that the order of the tables in the generated scripts are different. Can I control this order by any possible means?

Thanks in advance.

I do not know of a way offhand via the generate scripts wizard, however you can manually generate a script for each table, copy them to the clipboard, and then paste them into the desired order into a new query window.

hope this helps,

derek

|||

You can 'cut and paste' the script files using your editor (Visual Notepad, for example).

Otherwise, you cannot 'control' the order of elements in the script that the scripting wizard creates.

No comments:

Post a Comment