开发者

In SQL Management Studio 2005 can I generate JUST the constraints and indexes ALTER SQL queries?

In SQL Server 2000 Enterprise Manager when someone used "Generate SQL Script" on a database it was possible to unti开发者_开发技巧ck "generate the CREATE command ..." and "generate the DROP command ..." option and then tick the "Script indexes" "Script Full Indexes" etc. This would generate a script filled with ALTER TABLE commands (assuming the database had tables with indexes and constraints).

My problem is that in SQL Management Studio for 2005 (and I think 2008) this ability seems to have disappeared. When I chose not to generate the CREATE scripts but tick all of the options for indexes etc. it generates a blank file.

Am I missing something in the options??

Can anyone help?

Cheers,

Niko


Unfortunately that option seems to have been retired. You will have to generate them yourself using a script. Several examples exist on the web: link

There is also a utility here that looks like it will work for you as well: link

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜