生成数据库中所有索引的脚本 [英] Generate script of All the indexes in a database

查看:158
本文介绍了生成数据库中所有索引的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想生成数据库中所有索引的脚本(创建索引)。

I want to generate a script of all the indexes in a database(Create Index).

我不希望索引脚本和create table脚本一起使用。我们如何在SQL Server(2005或2008)中生成它。群集和非群集索引需要单独的脚本。

I don't want the index script along with create table script. how can we generate it in SQL Server (2005 or 2008). There needs to be separate script for Clustered and Non Clustered Indexes.

推荐答案

这是关于我使用的noreferrer> SQL Server Central

This is an excellent article on SQL Server Central that I've used.

这是另外你可能会更喜欢。

如果它不是你想要的那样(排序,过滤)我确信编辑这些比从头开始更容易。

If it's not exactly what you're looking for (sorting, filtering) I'm sure it would be easier to edit these than to start from scratch.

这篇关于生成数据库中所有索引的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆