Data Pump Import (Impdp) adds multiple Blank Spaces (0x20) to PLSQL code. (Doc ID 761585.1)

Last updated on NOVEMBER 28, 2016

Applies to:

Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 10.2.0.4 - Release: 10.1 to 10.2
Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.1.0.7 - Release: 11.1 to 11.1
Information in this document applies to any platform.

Symptoms


TEST CASE
---------

-- Create user schemas
connect / as sysdba

drop user u1 cascade;
create user u1 identified by u1 default tablespace testcase;
grant dba to u1;

drop user u2 cascade;
create user u2 identified by u2 default tablespace testcase;
grant dba to u2;


-- Create procedure
connect u1/u1
drop procedure u1.my_test1;
create or replace procedure u1.MY_TEST1 as
begin
 null;
end;
/



-- Export/Import
expdp u1/u1 DIRECTORY=test_dp DUMPFILE=export_schemas.dmp
impdp u1/u1 directory=test_dp DUMPFILE=export_schemas.dmp remap_schema=u1:u2



-- Verify original procedure
SQL> select text from dba_source
2 where owner ='U1' and name='MY_TEST1';

TEXT
------------------------------
procedure MY_TEST1 as
begin
 null;
end;


-- Procedure code after having used Expdp/Impdp
SQL> select text from dba_source
2 where owner ='U2' and name='MY_TEST1';

TEXT
------------------------------
PROCEDURE      "MY_TEST1" as <== There were blank spaces added!
begin
 null;
end;



REFERENCE
A very similar issue is described by the following note:

Note 1060772.1 -- Data Pump Import (Impdp) Adds Blank Lines to PLSQL code.


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms