How to enable/disable constraints in sybase

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.
vkchaitu82Asked:
Who is Participating?
 
Joe WoodhouseConnect With a Mentor Principal ConsultantCommented:
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
 
Joe WoodhousePrincipal ConsultantCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.