@Rubens Farias This, unfortunately, does not work very well for complex databases with many foreign key restrictions, and sometimes for circular dependencies, as there are many script errors, and SQL Server Management Studio does not seem to be very smart about streamlining scripts.
I found a (a few more missing) way to do this, with the two mentioned marc_s commercial tools. We have our own tool for creating database scripts, so I first transfer the schema without SP and views, and then Sql Data Compare data, and then, using our internal DbScripter, I generate SP and Views. It works for statistics, even for full-text catalogs, very nice. But: at least in one case when the data set was very large, a deadlock occurred on the sql server when the data comparison migration tool was used. Still working on it, this is annoying.
Still not an ideal solution, but have not found a better one, so I will answer my answer, as was said ...
source share