Solved

How to enable/disable constraints in sybase

Posted on 2010-09-08
2
1,713 Views
Last Modified: 2012-05-10
i have two databases one is source database and another one is target database. i need to load the data from source to target data base. before going to that i need to disbale contraints.  and after loding the data in to target databse i need to enable the contraints. can you help me out what is the code for that.
0
Comment
Question by:vkchaitu82
  • 2
2 Comments
 
LVL 24

Accepted Solution

by:
Joe Woodhouse earned 500 total points
ID: 33627269
ALTER TABLE [...] DROP CONSTRAINT [...]

ALTER TABLE [...] ADD CONSRAINT [...]


If you don't currently have scripts or source code for the schema to do this, you can easily automate it. The built-in "ddlgen" (search your Sybase directory) can do this for you, or search the web for "db_schema".
0
 
LVL 24

Expert Comment

by:Joe Woodhouse
ID: 33667829
Building on my previous answer - you cannot disable constraints in Sybase ASE except by completely dropping them. Likewise the only way to re-enable them is to create them again.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note: This is the second blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   Every month t…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now