?
Solved

How to enable/disable constraints in sybase

Posted on 2010-09-08
2
Medium Priority
?
1,998 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 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
In the below post we have mentioned the best hosting type for startups. Also, check out some of the superlative web hosting companies that are proposing affordable web hosting solutions to host your startup website.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

807 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