在执行Oracle数据库导入时出现ORA-01659异常的解决办法

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/iteye_19543/article/details/82570554
[img]http://dl2.iteye.com/upload/attachment/0094/3271/fe9178ae-9ccb-31be-bcb7-8d70c17167f7.jpg[/img]
我在执行一次数据库导出任务时出现异常如下:

导入数据时出现错误:
IMP-00017: 由于 Oracle 错误 1659, 以下语句失败:
"CREATE TABLE "TB_XXXXXXXX" ("SERV_ID" NUMBER(9, 0) NOT NULL ENABLE, "ELEMEN"
"T_TYPE" NUMBER(1, 0) NOT NULL ENABLE, "CATALOG_ID" NUMBER(9, 0) NOT NULL EN"
"ABLE, "CATALOG_NAME" VARCHAR2(40) NOT NULL ENABLE) PCTFREE 10 PCTUSED 40 I"
"NITRANS 1 MAXTRANS 255 STORAGE(INITIAL 10485760 FREELISTS 1 FREELIST GROUPS" (建表语句表名表空间都是示例说明,非真实)
" 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_CMS" LOGGING NOCOMPRESS"
IMP-00003: 遇到 ORACLE 错误 1659
ORA-01659: unable to allocate MINEXTENTS beyond 8 in tablespace IOM_EVNET_DATA

解决办法时,用文本编辑器打开导出的文件,将以上
TABLESPACE "TS_CMS"替换为
TABLESPACE "TS_CUNTONG".

TS_CUNTONG是目的数据库的表空间名。

然后在执行导入,就可以了。
展开阅读全文

Hibernate执行查询时出现以下异常

07-28

n Hibernate: select count(*) as col_0_0_ from xxx.t_sharefoodtype sharefoodt0_n```norg.hibernate.exception.SQLGrammarException: could not execute queryn at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)n at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)n at org.hibernate.loader.Loader.doList(Loader.java:2216)n at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)n at org.hibernate.loader.Loader.list(Loader.java:2099)n at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)n at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)n at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)n at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)n at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)n at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)n at com.xiangteng.foundation.dao.BaseHibernateDao.getTotalCountByHQL(BaseHibernateDao.java:522)n at com.xiangteng.foundation.service.BaseSpringService.getTotalCountByHQL(BaseSpringService.java:157)n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)n at java.lang.reflect.Method.invoke(Method.java:606)n at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)n at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:198)n at com.sun.proxy.$Proxy73.getTotalCountByHQL(Unknown Source)n at com.xiangteng.yft.timer.spring.SettingShareFoodTimer.create(SettingShareFoodTimer.java:92)n at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)n at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)n at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)n at java.lang.reflect.Method.invoke(Method.java:606)n at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)n at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)n at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)n at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)n at java.util.concurrent.FutureTask.run(FutureTask.java:262)n at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)n at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)n at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)n at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)n at java.lang.Thread.run(Thread.java:744)nCaused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'xxx.t_sharefoodtype' doesn't existn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)n at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)n at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)n at java.lang.reflect.Constructor.newInstance(Constructor.java:526)n at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)n at com.mysql.jdbc.Util.getInstance(Util.java:386)n at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)n at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)n at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)n at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)n at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)n at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2734)n at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)n at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2322)n at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)n at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)n at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)n at org.hibernate.loader.Loader.doQuery(Loader.java:674)n at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)n at org.hibernate.loader.Loader.doList(Loader.java:2213)n ... 32 morenn```nn数据库中的表已经存在,为何会出现该异常 问答

Oracle 数据库导入

07-24

Oracle 数据库在导入dmp文件后,发现有些表的数据未导入,再次使用imp命令单独导入表出现如下错误,求大神帮忙看下rnrn导入语句:imp cmsuser/xyz@cms45 file=E:\share\hhnews.dmp tables=(releaselib) fromuser=cmsuser log=E:\share\imp_releaselib.logrnrn日志:rn连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - ProductionrnWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsrnrn经由常规路径由 EXPORT:V10.02.01 创建的导出文件rn已经完成 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集中的导入rn导入服务器使用 AL32UTF8 字符集 (可能的字符集转换)rn导出客户机使用 AL32UTF8 字符集 (可能的字符集转换)rn. 正在将 CMSUSER 的对象导入到 CMSUSERrnIMP-00015: 由于对象已存在, 下列语句失败: rn "CREATE TABLE "RELEASELIB" ("ARTICLEID" NUMBER NOT NULL ENABLE, "ORIGINALID""rn " NUMBER, "INTROTITLE" VARCHAR2(800), "TITLE" VARCHAR2(1500), "SUBTITLE" VAR"rn "CHAR2(800), "AUTHOR" VARCHAR2(800), "ABSTRACT" VARCHAR2(2000), "CREATETIME""rn " DATE, "SOURCENAME" VARCHAR2(100), "SOURCEURL" VARCHAR2(100), "SOURCEICON" "rn "VARCHAR2(200), "ATTR" NUMBER(2, 0), "PICLINKS" VARCHAR2(800), "WORDCOUNT" N"rn "UMBER, "KEYWORD" VARCHAR2(400), "IMPORTANCE" NUMBER, "URL" VARCHAR2(400), ""rn "PICCOUNT" NUMBER, "MULTIATTACH" VARCHAR2(800), "ISREMOTESEND" NUMBER(2, 0),"rn " "IMPORTID" NUMBER, "TYPEID" NUMBER NOT NULL ENABLE, "CATEGORY" VARCHAR2(40"rn "0), "AUTOCATEGORY" VARCHAR2(400), "EDITOR" VARCHAR2(40), "LIABILITY" VARCHA"rn "R2(40), "PAGECOUNT" NUMBER, "COMMENTFLAG" VARCHAR2(100), "TAGS" VARCHAR2(40"rn "0), "CONTENT" CLOB, "MIME" CLOB, "ORITYPEID" NUMBER, "SELECTOR" VARCHAR2(40"rn "), "PROCESSOR" VARCHAR2(40), "SUBSCRIBER" VARCHAR2(40), "DISPLAYCTL" NUMBER"rn "(2, 0), "BRIEFABSTRACT" VARCHAR2(800), "ARTIPOSITION" VARCHAR2(800), "PUBTI"rn "ME" DATE, "TRACE" CLOB, "PREHANDLER" VARCHAR2(800), "MASTERID" NUMBER, "PUB"rn "LISHSTATE" NUMBER(2, 0), "TPLID" NUMBER, "ARCHIVEFLAG" NUMBER, "INTODATACEN"rn "TER" NUMBER, "INPUTER" VARCHAR2(40), "EXPIRATIONTIME" DATE, "ISTOP" NUMBER("rn "1, 0), "SPECSUFFIXWORD" VARCHAR2(100), "SPECSUFFIXURL" VARCHAR2(100), "IMPO"rn "RTMARK" VARCHAR2(200), "PAGETITLE" VARCHAR2(1000), "JABBARMARK" VARCHAR2(20"rn "0), "FIRSTPUB" VARCHAR2(40), "COMPOSE" NUMBER(1, 0), "ISSPECIALARTICLE" NUM"rn "BER(1, 0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 8"rn "38860800 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "CMS"rn "TABLE" LOGGING NOCOMPRESS LOB ("CONTENT") STORE AS (TABLESPACE "CMSCLOB" D"rn "ISABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE LOGGING STORAGE(INI"rn "TIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) LOB ("TRACE""rn ") STORE AS (TABLESPACE "CMSCLOB" DISABLE STORAGE IN ROW CHUNK 8192 PCTVERS"rn "ION 10 NOCACHE LOGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1"rn " BUFFER_POOL DEFAULT)) LOB ("MIME") STORE AS (TABLESPACE "CMSMIME" DISABLE"rn " STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE LOGGING STORAGE(INITIAL 6"rn "5536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))"rnIMP-00032: SQL 语句超过缓冲区长度rnIMP-00008: 导出文件中出现无法识别的语句: rn ANALYZE TABLE "MGMT_AGENT_SEC_INFO" ESTIMATE STATISTICS rn成功终止导入, 但出现警告。rn 论坛

Oracle 执行插入数据时发生异常【未执行句柄】急!!!

10-30

存储过程如下:rnCREATE OR REPLACE PROCEDURE SP_FUNDINFOMATIONrn(rn FUNCTION_ID IN INTEGER,rn FUNDCODE IN VARCHAR2 DEFAULT NULL,rn FUNDNAME IN VARCHAR2 DEFAULT NULL,rn CREATEDATE IN DATE DEFAULT NULL,rn FUNDGRADE IN VARCHAR2 DEFAULT NULL,rn FUNDNET IN NUMERIC DEFAULT NULL,rn CUR_FUNDINFO OUT PGK_FUNDINFOMATION.CUR_FUNDINFOMATIONrn)rnASrn STR_SQL VARCHAR2(5000);rn STR_CONDITION VARCHAR2(1000);rnBEGINrn IF FUNCTION_ID=100 THENrn IF FUNDCODE IS NOT NULL THENrn STR_CONDITION:= STR_CONDITION || ' FUNDCODE LIKE ''%'||FUNDCODE||'%''';rn END IF;rn rn IF FUNDNAME IS NOT NULL THENrn STR_CONDITION:= STR_CONDITION || ' AND FUNDNAME LIKE ''%'||FUNDNAME||'%''';rn END IF;rn rn STR_SQL:='SELECT FUNDCODE,FUNDNAME,CREATEDATE,FUNDGRADE,FUNDNET FROM SR_FUNDINFOMATION';rn rn IF STR_CONDITION IS NOT NULL THENrn STR_SQL:=STR_SQL||' WHERE '||STR_CONDITION;rn END IF;rn rn DBMS_OUTPUT.PUT_LINE(STR_SQL);rn rn OPEN CUR_FUNDINFO FORrn STR_SQL;rn END IF;rn rn IF FUNCTION_ID=101 THENrn INSERT INTO SR_FUNDINFOMATION(FUNDCODE,FUNDNAME,CREATEDATE,FUNDGRADE,FUNDNET) VALUES (FUNDCODE,FUNDNAME,CREATEDATE,FUNDGRADE,FUNDNET);rn COMMIT;rn END IF;rnrnrn调用该存储过程101功能号时发生【未执行句柄】的错误!估计是101功能里面没有打开游标引起的!rn我创建游标主要是为功能号100里输入查询数据;101里面不需要游标变量!rnrn希望哪位大侠帮我看看,有什么好方法解决这个问题!谢谢 论坛

数据库导入时遇到 ORACLE error 942错误

01-10

. . importing table "TPPB_CUSTOM_DW" 1348 rows importedrn. . importing table "TRANSPORTM" 13 rows importedrn. . importing table "TRNCDT" 50 rows importedrn. . importing table "TRNGRPIAINVAMT" 0 rows importedrn. . importing table "TRNGRPIAINVQTY" 0 rows importedrn. . importing table "TRNHSTF" 0 rows importedrn. . importing table "TRNPRCTYP" 200 rows importedrnIMP-00017: following statement failed with ORACLE error 1658:rn "CREATE TABLE "TRNSCTF" ("FTRN1" CHAR(3) NOT NULL ENABLE, "FTRN2" CHAR(3) NO"rn "T NULL ENABLE, "FTRNNO" NUMBER NOT NULL ENABLE, "FSLIPNO" CHAR(15), "FLOTNO"rn "" CHAR(10), "FLOTNO2" NUMBER, "FODRNO" CHAR(10), "FPURODRNO2" NUMBER, "FPRJ"rn "NO" CHAR(10), "FITEMNO" CHAR(15), "FFROMWHCD" CHAR(6), "FFROMLCTCD" CHAR(6)"rn ", "FTOWHCD" CHAR(6), "FTOLCTCD" CHAR(6), "FTRNQTY" NUMBER(18, 6), "FUNIT" C"rn "HAR(2), "FACTTRNQTY" NUMBER(18, 6), "FTRNUNIT" CHAR(2), "FTRNPRC" NUMBER(18"rn ", 6), "FACTPRC" NUMBER(18, 6), "FCURR" CHAR(3), "FTRNRATE" NUMBER(12, 6), ""rn "FRSNCD" CHAR(3), "FTRNDTE" DATE, "FINVUPDFLG" CHAR(1), "FMTUSUPFLG" CHAR(1)"rn ", "FDONEQTY" NUMBER(18, 6), "FENTDT" VARCHAR2(19), "FENTUSR" VARCHAR2(8), ""rn "FUPDTEDT" VARCHAR2(19), "FUPDTEUSR" VARCHAR2(8), "FUPDTEPRG" VARCHAR2(110),"rn " "FRATEDATE" CHAR(8), "FNOTE" CHAR(60), "FOLEPATH" VARCHAR2(254), "FWARECD""rn " CHAR(6), "FCSTFLG" CHAR(1), "FCHARGETYP" CHAR(6), "FFSBATCHNO" CHAR(10), ""rn "FPLNSALESDTE" DATE, "FINVAMT" NUMBER(18, 6), "FINVOICEFLG" CHAR(1), "FCOINV"rn "FLG" CHAR(1), "FCOTYPE" CHAR(2), "FPOTYPE" CHAR(2), "FCHARGESECT" CHAR(6), "rn ""FINVCNO" CHAR(23), "FLINE" FLOAT(126), "CACHE1" CHAR(100), "CACHE2" CHAR(1"rn "00), "CACHE3" CHAR(100)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 LOG"rn "GING STORAGE(INITIAL 456523776 NEXT 5472256 MINEXTENTS 1 MAXEXTENTS 2147483"rn "645 PCTINCREASE 1 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLES"rn "PACE "USERS""rnIMP-00003: ORACLE error 1658 encounteredrnORA-01658: unable to create INITIAL extent for segment in tablespace USERSrnIMP-00017: following statement failed with ORACLE error 942:rn "AUDIT DELETE,INSERT,UPDATE ON "TRNSCTF" BY ACCESS WHENEVER SUCCESSFUL"rnIMP-00003: ORACLE error 942 encounteredrnORA-00942: table or view does not existrn. . importing table "TRNTYPGRPT" 0 rows importedrn. . importing table "TTLCAEXPENSE" 0 rows importedrn. . importing table "TTLCGCOSTDRVM" 0 rows importedrn. . importing table "TTLCGIAINVAMT" 0 rows importedrn. . importing table "TTLCGIAINVQTY" 0 rows importedrn. . importing table "TTLCGITEMCOST" 0 rows importedrn[align=center].rn.rn.rn.rn.rn.rn.rn.[/align]rn. . importing table "WORSCCONF" 0 rows importedrn. . importing table "WORSCF" 0 rows importedrn. . importing table "WORSCPLNF" 0 rows importedrn. . importing table "WOTOOLF" 0 rows importedrn. . importing table "WRHDRF" 0 rows importedrnIMP-00017: following statement failed with ORACLE error 942:rn "ALTER TABLE "IGDUSGF" ADD CONSTRAINT "FK_IGDUSGF_TRNSCTF" FOREIGN KEY ("FTR"rn "N1", "FTRN2", "FTRNNO") REFERENCES "TRNSCTF" ("FTRN1", "FTRN2", "FTRNNO") E"rn "NABLE NOVALIDATE"rnIMP-00003: ORACLE error 942 encounteredrnORA-00942: table or view does not existrnAbout to enable constraints...rnIMP-00017: following statement failed with ORACLE error 2430:rn "ALTER TABLE "IGDUSGF" ENABLE CONSTRAINT "FK_IGDUSGF_TRNSCTF""rnImport terminated successfully with warnings. 论坛

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