Solved

How to enable/disable constraints in sybase

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio 2010 with SyBase 3 843
Backing up Sybase database Server using Veeam 3 1,148
dbisql 5 618
How to use a TRY CATCH in Sybase SQL syntax. Or something similar? 1 91
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

803 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