日期:2014-05-17  浏览次数:21206 次

急急急!!!到底为什么???
@ref_dis的时候,下面两条记录缺省了一段,怎么办 为何会如此
ALTER TABLE ATTRIBUTE_TRANSFORMATIONS$ disable CONSTRAINT ATTRIBUTE_TRANSFORMATI
ALTER TABLE REGISTRY$SCHEMAS disable CONSTRAINT REGISTRY_SCHEMA_FK 
SQL code

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
 



------解决方案--------------------
你确定你文件保存了,重新启动了命令窗口?
------解决方案--------------------
ALTER TABLE ATTRIBUTE_TRANSFORMATIONS$ disable CONSTRAINT ATTRIBUTE_TRANSFORMATI
后面为什么没有分号呢?