查询含有clob字段表&查询没有主键表的sql语句

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/qi20088/article/details/84399946
---------------------查询含有clob字段表的sql语句
select * from user_tab_cols where data_type in ('BLOB','CLOB')


-------------快捷查询表空间
SELECT 'create tablespace '||tablespace_name ||' DATAFILE ''d:\data\'||tablespace_name||'.BDF'' SIZE 100M;' FROM dba_tablespaces
WHERE tablespace_name='BDF_BASE'


----------------------查询没有主键表的sql语句
select * from user_tables a where not exists (
select 1 from user_constraints b WHERE a.TABLE_NAME=b.table_name
AND b.constraint_type='P')
展开阅读全文

含有blob字段表的恢复

05-15

我用的是oracle8i的数据库,我用exp system/manager inctype=complete file=backup.dmp备份数据库,该数据库是装在linux上面,当我用imp systme/manager inctype=restore full=y file=d:\backup.dmp进行恢复时,提示成功恢复,但是检查数据库,含有blob字段的表都没有恢复成功rnrn然后我单独备份一个含有blob字段的表,恢复不成功,过程如下:rnMicrosoft Windows 2000 [Version 5.00.2195]rn(C) 版权所有 1985-2000 Microsoft Corp.rnrnC:\>imprnrnImport: Release 8.1.7.0.0 - Production on 星期四 5月 15 14:43:22 2003rnrn(c) Copyright 2000 Oracle Corporation. All rights reserved.rnrn用户名: ncirn口令:rnrn连接到: Personal Oracle8i Release 8.1.7.0.0 - ProductionrnWith the Partitioning optionrnJServer Release 8.1.7.0.0 - Productionrnrn导入文件: EXPDAT.DMP> d:\new.dmprnrn输入插入缓冲区大小(最小为 8192 ) 30720>rnrn经由常规路径导出由EXPORT:V08.01.07创建的文件rn已经完成ZHS16GBK字符集和ZHS16GBK NCHAR 字符集中的导入rn只列出导入文件的内容(yes/no):no> yesrnrn导入整个导出文件(yes/no):no> yesrnrn. 正在将NCI的对象导入到 NCIrn "CREATE TABLE "TZHBGXXFB" ("ZHBGXXFXH" NUMBER(15, 0) NOT NULL ENABLE, "ZHBGX"rn "XFXZQY" CHAR(8) NOT NULL ENABLE, "ZHBGXXFBT" VARCHAR2(100), "ZHBGXXFNR" BLO"rn "B, "ZHBGXXFZZ" VARCHAR2(40), "ZHBGXXFRQ" VARCHAR2(8), "ZHBGXXFXSWZ" VARCHAR"rn "2(20)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 LOGGING STORAGE(INITI"rn "AL 131072 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 1167483645 PCTINCREASE 50 FREE"rn "LISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "MZYW" LOB ("ZHBG"rn "XXFNR") STORE AS (TABLESPACE "MZYW" ENABLE STORAGE IN ROW CHUNK 8192 PCTVE"rn "RSION 10 NOCACHE STORAGE(INITIAL 65536 NEXT 65536 MINEXTENTS 1 MAXEXTENTS "rn "1167483645 PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT"rn "))"rn. . 正在跳过表 "TZHBGXXFB"rnrn "CREATE UNIQUE INDEX "PK_TZHBGXXFB" ON "TZHBGXXFB" ("ZHBGXXFXH" , "ZHBGXXFXZ"rn "QY" ) PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 131072 NEXT 65536"rn " MINEXTENTS 1 MAXEXTENTS 1167483645 PCTINCREASE 50 FREELISTS 1 FREELIST GRO"rn "UPS 1 BUFFER_POOL DEFAULT) TABLESPACE "MZYW" LOGGING"rn "ALTER TABLE "TZHBGXXFB" ADD CONSTRAINT "PK_TZHBGXXFB" PRIMARY KEY ("ZHBGXX"rn "FXH", "ZHBGXXFXZQY") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE"rn "(INITIAL 131072 NEXT 65536 MINEXTENTS 1 MAXEXTENTS 1167483645 PCTINCREASE 5"rn "0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "MZYW" ENAB"rn "LE "rn "COMMENT ON TABLE "TZHBGXXFB" IS '????'"rn "ANALYZE TABLE "TZHBGXXFB" ESTIMATE STATISTICS "rn "ALTER TABLE "TZHBGXXFB" ENABLE CONSTRAINT "PK_TZHBGXXFB""rn成功终止导入,但出现警告。rnrnrnrn请指点迷径,不胜感激!!!! 论坛

没有主键的表查询返回为null

06-29

ele_mon_extrema 没有主键rnrnEleMonExtrema.hbm.xmlrnrnrnrnrnrn rn 历史月极值rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnEleMonExtremaId.javarnpublic class EleMonExtremaId implements java.io.Serializable rn private String stano;rn private Byte vmon;rn public EleMonExtremaId() rn rn public EleMonExtremaId(String stano, Byte vmon) rn this.stano = stano;rn this.vmon = vmon;rn rn public String getStano() rn return this.stano;rn rnrn public void setStano(String stano) rn this.stano = stano;rn rn public Byte getVmon() rn return this.vmon;rn rn public void setVmon(Byte vmon) rn this.vmon = vmon;rn rn public boolean equals(Object other) rn if ((this == other))rn return true;rn if ((other == null))rn return false;rn if (!(other instanceof EleMonExtremaId))rn return false;rn EleMonExtremaId castOther = (EleMonExtremaId) other;rnrn return ((this.getStano() == castOther.getStano()) || (this.getStano() != nullrn && castOther.getStano() != null && this.getStano().equals(rn castOther.getStano())))rn && ((this.getVmon() == castOther.getVmon()) || (this.getVmon() != nullrn && castOther.getVmon() != null && this.getVmon()rn .equals(castOther.getVmon())));rn rn public int hashCode() rn int result = 17;rn result = 37 * resultrn + (getStano() == null ? 0 : this.getStano().hashCode());rn result = 37 * resultrn + (getVmon() == null ? 0 : this.getVmon().hashCode()); rn return result;rn rnrnrnrnrnrnrnrnrnrnrn 论坛

没有更多推荐了,返回首页