Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 moving index to another environment

Author  Topic 

yipchunyu
Yak Posting Veteran

80 Posts

Posted - 2003-10-28 : 00:57:04
i changed lots of tables' index in the dev environement and want to apply those changes to the uat environment. any easy and possible way to do so?
thx

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-10-28 : 01:56:41
Yeah, you could script them out using the scripting wizard. You can get to it by right clicking on your database in Enterprise Manager, then go to All tasks, then to Generate SQL Scripts. I believe that you are going to get the create statements for the tables as well, but you can easily remove these. Just make sure that you go to the third tab and select the option to script out indexes, otherwise indexes will not show in the script.

You could also easily script out the changes if you have a product like SQL Compare. Using that tool you can compare the differences between the two databases and then script out the T-SQL needed to make them the same.

Tara
Go to Top of Page

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2003-10-28 : 02:32:33
And to save yourself the headache of doing this in the future, might I encourage you next time to write (or at least generate) scripts in the beginning and use them to make the changes to your dev environment too. That way, when you're ready to go to uat and later production, you'll know your scripts will work just fine because they were test initially in dev.

See [url]http://weblogs.sqlteam.com/markc/posts/343.aspx[/url] for more on this topic.

--------------------------------------------------------
Visit the SQLTeam Weblogs at [url]http://weblogs.sqlteam.com[/url]
Go to Top of Page

yipchunyu
Yak Posting Veteran

80 Posts

Posted - 2003-10-28 : 02:51:52
thx a lot for all your kindy advice
Go to Top of Page
   

- Advertisement -