Monday, January 20, 2014

IMP-00032: SQL statement exceeded buffer length



imp Joy@temp file=emp.dmp log=IMP_emp.log fromuser=scott touser=joy ignore=y

Import: Release 10.2.0.5.0 - Production on Sat Aug 17 20:14:56 2013
Copyright (c) 1982, 2007, Oracle.  All rights reserved.

 Password: 

Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 

Export file created by EXPORT:V09.02.00 via conventional path 

Warning: the objects were exported by SCOTT, not by you

 

import done in US7ASCII character set and AL16UTF16 NCHAR character set

import server uses AL32UTF8 character set (possible charset conversion)

IMP-00032: SQL statement exceeded buffer length

IMP-00008: unrecognized statement in the export file:

  OUPS 1) TABLESPACE "USERS" LOGGING NOCOMPRESS, PARTITION "MAX_PARTITION" VALUES LESS THAN (MAXVALUE)  PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 40960 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "USERS" LOGGING NOCOMPR...Killed

Solution:
In the source database we need to run:
SQL> select dbms_lob.getlength (dbms_metadata.get_ddl('TABLE','EMP'
,'SCOTT')) SQL_LENGTH" from dual;


SQL_LENGTH

----------

 38782

The above output gives the value of buffer we need to have atleast to run the import, so I used:

imp <USER>/<PASS> file=tabs.dmp log=tabs.log fromuser=<USER> touser=<USER> commit=y ignore=Y buffer=38782



This solved the problem.

2 comments:

  1. Thank you so much! This totally solved my problem and saved me hours of troubleshooting.

    ReplyDelete