Generate Create All Secondary Indexes For Entire Database

  • Comments posted to this topic are about the item Generate Create All Secondary Indexes For Entire Database

    Gary L. Fry
    Senior Database Administrator III
    MCTS, MCITP SQL Server 2008 Database Administration
    Colonial Life/UNUM

  • xx

  • I think this is some nice code. However, my cut/paste experience lead to many format problems. I had a bunch of ? marks after pasting this code into text pad. I think the formatting caused some of these problems. I was able to fix this by doing a find and replace operation.

    Thanks Again. Good ideas.

    [font="Tahoma"]Cheers,

    Sean :-D[/font]

  • Andrew-

    This does not add indexes to all columns. Where did you get that idea?? What were you reading? There is no blindly adding here!!!!

    Gary L. Fry
    Senior Database Administrator III
    MCTS, MCITP SQL Server 2008 Database Administration
    Colonial Life/UNUM

  • Sean, the ?'s appear during copy/paste operations for some code. The easiest solution is the perform a Find/Replace on the ?'s and replace them with spaces. If you editor supports it, you can take 4 ?'s and replace them with a tab.

  • I really like it. With a little tweaking, I'm sure it could be coded to detect an existing filegroup on any of the indexes and insert them automatically in the output code. I work with several databases that have only some indexes in a file group, and others not.

    Thanks for sharing,

    --Richard

    -- RTW
    Be curious!

  • Thanks for the script.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply