日期:2014-05-17 浏览次数:21173 次
SQL> spool ref_dis.sql Started spooling to D:\maoweiting\softwear\oracle sql developer\ref_dis.sql SQL> SELECT 'ALTER TABLE ' || TABLE_NAME ||' '|| 2 'disable CONSTRAINT ' || CONSTRAINT_NAME || ' ;' 3 FROM USER_CONSTRAINTS 4 WHERE 5 CONSTRAINT_TYPE = 'R'; 'ALTERTABLE'||TABLE_NAME||''|| -------------------------------------------- ALTER TABLE PLSQL_PROFILER_DATA disable CONSTRAINT SYS_C005466 ; ALTER TABLE PLSQL_PROFILER_UNITS disable CONSTRAINT SYS_C005463 ; ALTER TABLE OLAP_OLEDB_MDPROPS disable CONSTRAINT MDPROPVAL_FK ; ALTER TABLE WRM$_SNAPSHOT disable CONSTRAINT WRM$_SNAPSHOT_FK ; ALTER TABLE HS$_INST_INIT disable CONSTRAINT HS$_INST_INIT_FK1 ; ALTER TABLE HS$_CLASS_INIT disable CONSTRAINT HS$_CLASS_INIT_FK1 ; ALTER TABLE HS$_INST_DD disable CONSTRAINT HS$_INST_DD_FK1 ; ALTER TABLE HS$_INST_DD disable CONSTRAINT HS$_INST_DD_FK2 ; ALTER TABLE HS$_CLASS_DD disable CONSTRAINT HS$_CLASS_DD_FK1 ; ALTER TABLE HS$_CLASS_DD disable CONSTRAINT HS$_CLASS_DD_FK2 ; ALTER TABLE HS$_INST_CAPS disable CONSTRAINT HS$_INST_CAPS_FK1 ; ALTER TABLE HS$_INST_CAPS disable CONSTRAINT HS$_INST_CAPS_FK2 ; ALTER TABLE HS$_CLASS_CAPS disable CONSTRAINT HS$_CLASS_CAPS_FK1 ; ALTER TABLE HS$_CLASS_CAPS disable CONSTRAINT HS$_CLASS_CAPS_FK2 ; ALTER TABLE HS$_FDS_INST disable CONSTRAINT HS$_FDS_INST_FK1 ; ALTER TABLE ATTRIBUTE_TRANSFORMATIONS$ disable CONSTRAINT ATTRIBUTE_TRANSFORMATI ALTER TABLE REGISTRY$SCHEMAS disable CONSTRAINT REGISTRY_SCHEMA_FK ; ALTER TABLE REGISTRY$ disable CONSTRAINT REGISTRY_PARENT_FK ; 18 rows selected SQL> spool off Stopped spooling to D:\maoweiting\softwear\oracle sql developer\ref_dis.sql SQL> @ref_dis.sql 'ALTERTABLE'||TABLE_NAME||''|| -------------------------------------------- ALTER TABLE PLSQL_PROFILER_DATA disable CONSTRAINT SYS_C005466 ORA-00900: 无效 SQL 语句 Table altered Table altered Table altered Table altered Table altered Table altered Table altered Table altered Table altered Table altered Table altered Table altered Table altered Table altered ALTER TABLE ATTRIBUTE_TRANSFORMATIONS$ disable CONSTRAINT ATTRIBUTE_TRANSFORMATI ALTER TABLE REGISTRY$SCHEMAS disable CONSTRAINT REGISTRY_SCHEMA_FK ORA-00933: SQL 命令未正确结束 Table altered