Hi all, Still I couldn't came up with a way to achieve this target.
So as a workaround I thought of dropping all the UNIQUE constraints and then adding constraints which were not suppose to dropped. It may be more costly than our previously mentioned approach, I don't see any other way of achieving this. WDYT? Thanks On Wed, Feb 17, 2016 at 12:30 PM, Chamila Wijayarathna <[email protected]> wrote: > Hi all, > > Currently I am working on developing the migration client and and scripts > for DB2 to migrate from IS 5.0.0 to 5.1.0. > > There are some unique constraints, primary keys and foreign keys that has > been used in IS 5.0.0 which have been removed in IS 5.1.0. So I need to > remove those constraints in migration script. > > To drop unique constraints I only have the table name and columns of the > unique constraint. > > To drop the unique constraint, following query can be used. > > ALTER TABLE IDP_PROVISIONING_ENTITY DROP CONSTRAINT <CONSTRAINT NAME> > > But to do this I need to retrieve constraint name using table name and > column list. Constraint names are available in both "sysibm.systabconst" > and also in "SYSCAT.TABCONST" tables. How can I retrieve constraint name > using the information I have with me currently. > > Thank You! > > -- > *Chamila Dilshan Wijayarathna,* > Software Engineer > Mobile:(+94)788193620 > WSO2 Inc., http://wso2.com/ > -- *Chamila Dilshan Wijayarathna,* Software Engineer Mobile:(+94)788193620 WSO2 Inc., http://wso2.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
