<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Vipul Shah's SQL Blogs : SQL Server Management Studio</title><link>http://blogs.technet.com/vipulshah/archive/tags/SQL+Server+Management+Studio/default.aspx</link><description>Tags: SQL Server Management Studio</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Generating Scripts only for Clustered and Non-Clustered indexes in SQL Server 2005</title><link>http://blogs.technet.com/vipulshah/archive/2007/04/05/generating-scripts-only-for-clustered-and-non-clustered-indexes-in-sql-server-2005.aspx</link><pubDate>Thu, 05 Apr 2007 23:31:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:729342</guid><dc:creator>vishah</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/vipulshah/comments/729342.aspx</comments><wfw:commentRss>http://blogs.technet.com/vipulshah/commentrss.aspx?PostID=729342</wfw:commentRss><description>&lt;P&gt;In following cases you will need to generate a scripts for all the clustered and non-clustered indexes on the SQL Server 2005 database:&lt;/P&gt;
&lt;P&gt;1. During heavy bulk inserts into a table, you might want to drop all the indexes on the table to make the bulk load process go faster.&amp;nbsp; Once the bulk load is done you can re-create those indexes back using the scripts.&lt;/P&gt;
&lt;P&gt;2. If all the clustered and non-clustered indexes are built on a one single filegroup (PRIMARY, for example) and if you would like to move them to an appropriate filegroup (_DATA and _IDX, for example), you would need both create and drop scripts for clustered and non-clustered indexes.&lt;/P&gt;
&lt;P&gt;There is a way to achieve that.&amp;nbsp;&amp;nbsp; You can download a utility called DBScript from below website:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;A href="http://www.codeplex.com/SQLSrvScrpt/Wiki/View.aspx?title=DBScript%20Utility&amp;amp;referringTitle=Home"&gt;&lt;FONT face=Calibri size=3&gt;http://www.codeplex.com/SQLSrvScrpt/Wiki/View.aspx?title=DBScript%20Utility&amp;amp;referringTitle=Home&lt;/FONT&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;This utility will help you script clustered, non-clustered indexes, foreign keys, and triggers - both CREATE and DROP.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="COLOR: #1f497d"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=729342" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/vipulshah/archive/tags/Indexes/default.aspx">Indexes</category><category domain="http://blogs.technet.com/vipulshah/archive/tags/SQL+Server+Management+Studio/default.aspx">SQL Server Management Studio</category><category domain="http://blogs.technet.com/vipulshah/archive/tags/Data+Scripter+Utility/default.aspx">Data Scripter Utility</category></item></channel></rss>