DTS export problem

  • hi,

     Iam exporting table and views to my client from sql server 2000 to sql server 2000 by selecting, copy tables and views. After exporting , it does'nt preserve the Primary Key and Identity values of the tables, i have to manually do it again by accessing the client's computer.

     

    Can anybody tell me how to preserve primary and identity values.

     

    Regards

    Arshad.

  • I assume you mean preserve the properties of the PK's and identity properties. One way would be to script them out and have it as a second task in the workflow as a T-SQL task, might be a better way...

    ------------

    Ray Higdon MCSE, MCDBA, CCNA

  • hi,

     I can't understand what u said.Iam specifying primary key and identity values on a table named trans on id column. After exporting the database, on the client side when i view the table there is PK or identity values on the trans table.

    Pls explain, why this happens.

    Arshad.

  • THis page may help - http://www.sqldts.com/?293,1

    I was suggesting you use SQL tasks in DTS to run the scripts to add IDENTITY columns and alter the tables to make PK's but I'm sure there is a better way.

    ------------

    Ray Higdon MCSE, MCDBA, CCNA

  • hi ray,

     I have gone through http://www.sqldts.com/?293,1. but the article says that the source and destination has already has the table structure and they are exporting only the datas.

    In my case iam transferring the whole database,not a particular table or exporting data's.

    do you know anyother resource.

    Regards

    Arshad.

     

  • If you are transferring the whole db, I would not use DTS, I would use T-SQL jobs to do backup and restore. If they are on seperate machines you could use a command shell script to copy the file over. There is the copy db wizard in DTS that you could look at as well

    ------------

    Ray Higdon MCSE, MCDBA, CCNA

  • hi,

     Thankz for your support,there is some errors while copying DB, Anyway i will take care of that.

     

    Thankz

    Arshad.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply