I use SQL Server 2005 scripts wizard to generate scripts for database. Is there any ways it generate script in the order of table name?
I need to compare all data tables between two databases. It is a crazy job if I compare one table by one table.
If I can generate database script in the order of table name, which will make my job easy a lot.
Thanks for any advise.
I'd recommend getting visual studio team edition for database professionals. It can do schema and data comparisons with a nice user interface.
If that's not an option, I'm sure you could find a free file compare utility on the web, so you can stop comparing scripts manually.
|||I believe thats best option to do for a comparison of the objects within the database.
But there is no such option within generate scripts wizard for the table order, you have to edit the content once it is generated.
|||AnthonyMartin: My guess is that the original poster _is_ using a file comparison utility. The problem is when the order of the tables are rearranged, it looks like huge chunks have changed when in fact the only thing that changed was the order the objects were scripted.I'm having the same problem as the original poster. Even when comparing a script generated from the same database on the same server from two different dates, the order that the objects are scripted will jump around, even for objects that weren't changed at all since the last time they were scripted.
In my case, I'm not particular about how the objects are sorted as long as it is consistent! I want to be able to compare the script from say two months ago and find the one table that had a single column altered in a database containing dozens of tables, stored procedures etc - the proverbial needle in a haystack. A tool like Beyond Compare will do this quite well, but has difficulties when the order of the objects is inconsistent.
No comments:
Post a Comment