When I use import/export wizard it loses keys and indexes. I need to import many tables. please help.
Also I created tables by generating script and then do importing, but appear validating error. Maybe I'm doing something wrong?
First you make a create script to create tables, keys, indexes. If you right click on database, in the context menu you can click create script on database call the wizard.
With this script you can create your new database. Afterwards you import your data as it is, but your SSIS (aka DTS) wizard don't create the table, but just import the data.
Remark: If you have FOREIGN KEYS, you need to make sure that your SSIS data import part imports in the right order!
I went the way myself to make a big sql textfile which creates all structure where each part is seperated by GO and another file where I create the data (this can be replaced by your wizard).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With