Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: Database: MS SQL Server
 Altering Constraints...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

SiSL
Average Member

Turkey
671 Posts

Posted - 16 February 2009 :  15:38:00  Show Profile  Visit SiSL's Homepage
Greetings,

I have two databases of SQL2008... And two same tables in each... Ofcourse one of them is not created automatically, so missing contraints or only one primarykey instead of 3... (Data, however, is different)

So how can I copy one of tables constraints and pk options etc. without damaging existing data?
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

ruirib
Snitz Forums Admin

Portugal
26364 Posts

Posted - 16 February 2009 :  17:06:07  Show Profile  Send ruirib a Yahoo! Message
Script the table using EM and then use the statements to create ALTER TABLE statements for the existing table.<


Snitz 3.4 Readme | Like the support? Support Snitz too
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 17 February 2009 :  03:55:42  Show Profile  Visit SiSL's Homepage
Well problem is here ruirib, I don't see Script to-> "Alter to" highlighted, it is disabled when I used it on table :(
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 17 February 2009 03:55:57
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 17 February 2009 :  04:09:32  Show Profile  Visit HuwR's Homepage
just right click on the constraint you want to copy from and script constraint as 'create to'

then just change the table names etc and then run the create constraint queery<
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 17 February 2009 :  13:47:29  Show Profile  Visit SiSL's Homepage
Ah great, thanks :)<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.18 seconds. Powered By: Snitz Forums 2000 Version 3.4.07