Does anyone have a script to list of CREATE INDEX statements for all existing indexes in a SQL Server database?
This thread List of all index & index columns in SQL Server DB has great tips on how to find them. But a script to generate the CREATE INDEX
statements would be great. Sometimes we come into a situation without adequate data, or indexes have been added in an ad-hoc manner over time without documentation, so the create statements are missing. Like in a situation I find myself in right now.
Thanks.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…