Tuesday, February 14, 2012

Creating DB from scripts

I'm using an integration project to recreate a db as needed from all the scripts i've previously generated. I'm encountering an error when the tables get built in the wrong order because of foreign key constraints. Does anyone know of a way to programmatically execute the scripts of sql tables that don't violate the constraints; so after, I can execute the other table create scripts? Any help or guidance in any way would be appreciated.

I think the SMO alias may be better for you, as SMO has at least the ability to generate scripts taking account of dependencies. See the SMO forum here: http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=88&SiteID=1

Donald Farmer

|||Thanks. I will take a look.

No comments:

Post a Comment