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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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).