Solved

How to enable/disable constraints in sybase

Posted on 2010-09-08
2
1,683 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
Comment Utility
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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 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

6 Experts available now in Live!

Get 1:1 Help Now