- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
10#
发表于 2012-1-13 19:58:18
ODM Data:- OERR: IMP 32 "SQL statement exceeded buffer length" [ID 21664.1]
- Error: IMP 32
- Text: SQL statement exceeded buffer length
- -------------------------------------------------------------------------------
- Cause: The buffer was too small for the SQL statement being read in
- Action: Rerun with a larger buffer. This may also be an indication of a
- corruption in the import data file
- IMP-32 Obtained During Import [ID 846397.1]
- Applies to:
- Oracle Server - Enterprise Edition - Version: 9.2.0.1 to 11.2.0.2 - Release: 9.2 to 11.2
- Information in this document applies to any platform.
- Symptoms
- You try to import an export dump using the original import urility (imp) and received the errors:
- IMP-00032: SQL statement exceeded buffer length
- IMP-00008: unrecognized statement in the export file
- Let's follow the next example that demonstrates this.
- -- create a big table (with a large DDL, 1000 columns) in schema test
- connect test/test
- create table big_table
- (
- col000000000000000000000000001 varchar2(4000) not null,
- col000000000000000000000000002 varchar2(4000) not null,
- col000000000000000000000000003 varchar2(4000) not null,
- col000000000000000000000000004 varchar2(4000) not null,
- col000000000000000000000000005 varchar2(4000) not null,
- col000000000000000000000000006 varchar2(4000) not null,
- col000000000000000000000000007 varchar2(4000) not null,
- col000000000000000000000000008 varchar2(4000) not null,
- col000000000000000000000000009 varchar2(4000) not null,
- col000000000000000000000000010 varchar2(4000) not null,
- .... 1000 columns
- col000000000000000000000001000 varchar2(4000) not null
- );
- -- insert one row into table
- declare
- i number := 1;
-
- begin
- insert into big_table values
- (
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- lpad (to_char (i), 1000, '0'),
- .... 1000 columns
- lpad (to_char (i), 1000, '0')
- );
- commit;
- end;
- /
- Export the table with:
- #> exp test/test file=big_table.dmp tables=big_table
- This ends with:
- Export: Release 11.1.0.7.0 - Production on Mon Jun 22 11:52:53 2009
- Copyright (c) 1982, 2007, Oracle. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
- About to export specified tables via Conventional Path ...
- . . exporting table BIG_TABLE 1 rows exported
- Export terminated successfully without warnings.
- Drop the table in schema TEST and import it back from written dump with:
- #> imp test/test file=big_table.dmp tables=big_table
- This ends with:
- Import: Release 11.1.0.7.0 - Production on Mon Jun 22 11:53:55 2009
- Copyright (c) 1982, 2007, Oracle. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Export file created by EXPORT:V11.01.00 via conventional path
- import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
- . importing TEST's objects into TEST
- IMP-00032: SQL statement exceeded buffer length
- IMP-00032: SQL statement exceeded buffer length
- IMP-00008: unrecognized statement in the export file:
- R2(4000) NOT NULL ENABLE, "COL000000000000000000000000945" VARCHAR2(4000) NOT
- NULL ENABLE, "COL000000000000000000000000946" VARCHAR2(4000) NOT NULL ENABLE, "C
- OL000000000000000000000000947" VARCHAR2(4000) NOT NULL ENABLE, "COL0000000000000
- 00000000000948"...
- IMP-00032: SQL statement exceeded buffer length
- IMP-00008: unrecognized statement in the export file:
- 000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 00000000000000000000000000000000000000000000000000000000000000000000000000000000
- 000000000000000...
- . importing TEST's objects into TEST
- Import terminated successfully with warnings.
- Cause
- The internal BUFFER (default 32 KB, if not specified in imp command line) is also used to transfer the DDL statements from export dump file to Oracle server. If the DDL exceeds the BUFFER length, then IMP-32 is raised.
- To obtain the DDL length run at export (source) site the statement:
- select dbms_lob.getlength (dbms_metadata.get_ddl ('TABLE', 'BIG_TABLE', 'TEST')) "SQL_LENGTH" from dual;
- SQL_LENGTH
- ----------
- 67270
- 1 row selected.
- The length of the DDL statement is in this case 67270 bytes, what exeeds the default BUFFER length (30720 bytes ~ 32 KB).
- Solution
- Increase the BUFFER size:
- #> imp test/test file=big_table.dmp tables=big_table buffer=100000
- and import succeeds:
- Import: Release 11.1.0.7.0 - Production on Mon Jun 22 12:10:15 2009
- Copyright (c) 1982, 2007, Oracle. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Export file created by EXPORT:V11.01.00 via conventional path
- import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
- . importing TEST's objects into TEST
- . importing TEST's objects into TEST
- . . importing table "BIG_TABLE" 1 rows imported
- Import terminated successfully without warnings.
- IMP-32 and IMP-8 When Doing an Import With a too Small (Default) Buffer Size [ID 146319.1]
- Applies to:
- Oracle Server - Enterprise Edition - Version: 8.0.5.0 to 11.2.0.2 - Release: 8.0.5 to 11.2
- Information in this document applies to any platform.
- Symptoms
- You are doing an import with parameter SHOW=Y option and receive the following errors:
- #> imp test/test file=test.dmp full=y show=y
- Import: Release 11.1.0.7.0 - Production on Thu Feb 26 16:43:24 2009
- Copyright (c) 1982, 2007, Oracle. All rights reserved.
- Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
- With the Partitioning, OLAP, Data Mining and Real Application Testing options
- Export file created by EXPORT:V11.01.00 via conventional path
- import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
- . importing TEST's objects into TEST
- IMP-00032: SQL statement exceeded buffer length
- IMP-00032: SQL statement exceeded buffer length
- IMP-00008: unrecognized statement in the export file:
- R2(4000) NOT NULL ENABLE, "COL000000000000000000000000945" VARCHAR2(4000) NOT
- NULL ENABLE, "COL000000000000000000000000946" VARCHAR2(4000) NOT NULL ENABLE, "C
- OL000000000000000000000000947" VARCHAR2(4000) NOT NULL ENABLE, "COL0000000000000
- 00000000000948"...
- IMP-00032: SQL statement exceeded buffer length
- Cause
- Even with the SHOW=Y option used, the import utility verifies the syntax of all the SQL DDL statements in the dump file. Import uses default buffer size of 64K.
- If the SQL statement in dump file exceeds the default buffer size, then the buffer size needs to be increased to accommodate this, otherwise the imp utility won't be able to load the full SQL statement into the buffer and raise IMP-32 and IMP-8.
- Solution
- Increase the buffer size, other than the default (64K):
- #> imp test/test file=test.dmp full=y show=y buffer=1000000
复制代码 |
|