Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to tell SQL Server Export Wizard to also create indexes of new table in destination?

I am working with SQL Server 2008 R2.

I have a source database and a destination database. In source database I have a table named rule_attribute which have 2 indexes. This table does not exist in destination database.

I ran the SQL Server Export Wizard to copy this table from source database to destination database.

The wizard ran successfully and the table was copied to destination database along with data. But the 2 indexes on this table were not created.

Is there any reason why indexes were not created?

Is there any setting which allows to create indexes as part of wizard?

Thanks

like image 392
ChumboChappati Avatar asked Dec 11 '25 22:12

ChumboChappati


1 Answers

The Import/Export wizard doesn't allow copying indexes, but if you use the Database Scripting tool it will allow you to add indexes in the scripts.

enter image description here

like image 83
M.Ali Avatar answered Dec 13 '25 17:12

M.Ali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!