Hi Manu
Script the tables out in EM (if you're using 2000). That will transfer
the constraints. Right Click the table, select all tasks, Generate SQL
Script. In formatting, make sure Generate the Create command is ticked
(but not Generate the DROP command).
In options, tick indexes and primary keys. Then in the general tab click
preview. That generates the script for the table. You need to alter the
names of the table to the new one each time it occurs and give the
indexes unique names in order for the script to work.
I think you will need to set up the relationships still though as it's a
new table (could be wrong here).
If you're using management console it's a bit easier - right click the
table and select script table as, CREATE to, new window. You still need
to alter the table/constraint names though before running the script.
Carol.
-----Original Message-----
From: Manu Varghese
[mailto:mssqldba-ezmlmshield-x31390839.[Email address protected]
Sent: 31 May 2007 14:55
To: LazyDBA Discussion
Subject: DTS
Hi
I want to export two tables from one database to other,the table
contain constraints and relationships.how can i transfer it with
constraints and relationships.I used dts wizard but relationships and
constraints are not coming.
Regards
Manu.
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
This email and any files transmitted within it are private and confidential.
If you are not the intended recipient, this email and any attachments within it have been transmitted to you in error.
You are prohibited from using, copying, distributing or otherwise using the information contained within this email.
Nothing in this email message amounts to a contractual or legal commitment on the part of Optilan unless confirmed by a communication signed on behalf of the company.
Any email cannot be guaranteed to be secure, error free or free from viruses. Although every possible care is taken by Optilan, Optilan does not accept any liability whatsoever for any loss or damage which may be caused as a result of the transmission of this message by email.
MS Sql Server LazyDBA home page