Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
maagt
Starting Member
20 Posts |
Posted - 2007-07-03 : 21:48:28
|
| Hi there,I'm facing a problem that errors occurred when i scheduled the job running a DTS, so i removed the primary & foreign key and the DTS is running successfully. Now, the problem is, i need to build back the primary and foreign key, can anyone assists me how to write a script to build back these two keys?Please help!! Thanks in advance!! |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-07-03 : 23:42:31
|
| You should script them before deleting. Now you can add them with 'alter table' if you know which columns to work on. |
 |
|
|
maagt
Starting Member
20 Posts |
Posted - 2007-07-04 : 03:53:59
|
| Thanks rmiao. Think i'm gonna search for the script on how to add them with 'alter table'. ;) |
 |
|
|
|
|
|