Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Career advice for the IT professional
Browse by Tags · View All
SQLServerPedia Syndication 194
SQL Server 60
SSAS 40
#SQL SERVER 19
SSIS 18
2012/Denali 17
Career 17
Denali 14
SQL Server 2012 13
MDS/MDM 12

Archive · View All
June 2011 20
August 2011 15
July 2011 15
March 2012 15
October 2011 14
September 2011 14
May 2011 13
November 2011 12
February 2012 11
April 2012 10

James Serra's Blog

SQL Server does not script indexes by default

Jul 27 2011 12:00AM by James Serra   

Here is a got-ya that happened to me.  In SQL Server I want to generate a script of all the tables in case I need to re-create them.  This is usually the case in a development environment when I’m building a database.  So in Object Explorer I click on the Tables folder, open the tab Object Explorer Details, select all the tables (making sure not to select the System Tables folder), right mouse click and select “Script Table as -> CREATE To -> File”.

Great, I can now drop tables or modify them and can quickly get them back to the way they were because I did the right thing in creating a file with the scripts for them (maybe doing this daily).

So I drop a table, then go to my scripts, find the one for that table and execute it to recreate it.  Uh-oh, where have the indexes gone?  Well, by default, SQL Server does NOT script out the indexes, so they will not be re-created!  To change this, go to Tools -> Options -> SQL Server Object Explorer -> Scripting.  Set “Script indexes” to true.  Also note that “Script triggers” is set to false by default.

So, one of the first things you should do is change the option “Script indexes” to true so you can avoid trying to remember what the indexes were like I had to do.  It was a pain!


Republished from James Serra's Blog [70 clicks].  Read the original version here [32134 clicks].

James Serra
35 · 5% · 1664
0
Liked
 
0
Lifesaver
 
0
Refreshed
 
0
Learned
 
0
Incorrect



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]