Problem solve Get help with specific problems with your technologies, process and projects.

Disable all foreign keys in the user's schema

This script shows how to disable all foreign keys in the user's schema.

Here's a script that disables all foreign keys in the user's schema. In SQL*Plus, run the following script:

spool disablefk.sql
select 'alter table ' || table_name ||
       ' disable constraint ' || 
       constraint_name || ';'
from user_constraints 
where constraint_type = 'R';
spool off
start disablefk.sql

For More Information


Dig Deeper on Oracle database design and architecture

SearchDataManagement
SearchBusinessAnalytics
SearchSAP
SearchSQLServer
TheServerSide.com
SearchDataCenter
SearchContentManagement
SearchHRSoftware
Close