SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Generate Create All Secondary Indexes For Entire Database


Generate Create All Secondary Indexes For Entire Database

Author
Message
Gary L. Fry-196295
Gary L. Fry-196295
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 221
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
Andrew Kelly
Andrew Kelly
SSC-Enthusiastic
SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)SSC-Enthusiastic (192 reputation)

Group: General Forum Members
Points: 192 Visits: 209
xx



Sean Woehrle
Sean Woehrle
SSC-Enthusiastic
SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)SSC-Enthusiastic (107 reputation)

Group: General Forum Members
Points: 107 Visits: 155
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.

Cheers,

Sean :-D

Gary L. Fry-196295
Gary L. Fry-196295
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 221
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
tskelley
tskelley
SSC-Enthusiastic
SSC-Enthusiastic (197 reputation)SSC-Enthusiastic (197 reputation)SSC-Enthusiastic (197 reputation)SSC-Enthusiastic (197 reputation)SSC-Enthusiastic (197 reputation)SSC-Enthusiastic (197 reputation)SSC-Enthusiastic (197 reputation)SSC-Enthusiastic (197 reputation)

Group: General Forum Members
Points: 197 Visits: 1177
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.



The Learner
The Learner
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 245
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!
Iwas Bornready
Iwas Bornready
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16286 Visits: 885
Thanks for the script.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search