Home All Groups Group Topic Archive Search About

generating create scripts of entities

Author
12 Aug 2005 3:40 PM
jason
hello everyone,

probably a simple question, but i'm not sure how to tackle it. i have
several tables that i would like to build a creation script for. i
built the tables in enterprise manager, and tried to use the All
Tasks->Generate Sql Script action to generate the creation script for
these tables.

however, the script generated doesn't include any of the keys,
constraints, indexes, or default values that i specified for the table.

is there a way to include those in a script generation task? or do i
just have to add those manually to the script that is generated?

thanks,

jason

Author
12 Aug 2005 3:44 PM
Adam Machanic
Look in the options tab.  There's a check box for "Script PRIMARY keys,
FOREIGN keys, defaults, and check constraints".


--
Adam Machanic
SQL Server MVP
http://www.datamanipulation.net
--


Show quote
"jason" <iae***@yahoo.com> wrote in message
news:1123861220.532142.92370@g43g2000cwa.googlegroups.com...
> hello everyone,
>
> probably a simple question, but i'm not sure how to tackle it. i have
> several tables that i would like to build a creation script for. i
> built the tables in enterprise manager, and tried to use the All
> Tasks->Generate Sql Script action to generate the creation script for
> these tables.
>
> however, the script generated doesn't include any of the keys,
> constraints, indexes, or default values that i specified for the table.
>
> is there a way to include those in a script generation task? or do i
> just have to add those manually to the script that is generated?
>
> thanks,
>
> jason
>
Author
12 Aug 2005 4:08 PM
jason
that's what i was missing, thanks a lot.

jason
Author
12 Aug 2005 3:45 PM
Stu
Look at the options tab on the dialog box, and select the appropriate
checkboxes.

HTH,
Stu
Author
12 Aug 2005 4:08 PM
jason
that's what i was missing, thanks a lot.

jason

AddThis Social Bookmark Button