By running the above query, it generates you a list of all tables and its respective constraints, the present query generates the alter table statements for removing primary and foreign keys only, you can add ('PK','F','U') to the list if you have unique keys also. copy the result list and execute that and the constraints will be disabled.
I hope the problem will be solved by this
Thank you.
Vemprala Chaitanya.