grant dba to c##user1 container=all;
conn C##USER1/oracle@pdb11
create directory ORA_DIR as '/home/oracle';
grant all on directory ORA_DIR to public;
conn C##USER1/oracle@pdb12
create directory ORA_DIR as '/home/oracle';
grant all on directory ORA_DIR to public;
create table tab1(col1 number);
create table tab2(col1 number);
insert into tab1 values(1);
insert into tab1 values(2);
insert into tab2 values(100);
commit;
create or replace view view1 as select a.* from tab1 a,tab2 b where a.col1 < b.col1;
select * from view1;
expdp c##user1/oracle@pdb11 directory=ORA_DIR dumpfile=view1.dmp logfile=view1.exp.log VIEWS_AS_TABLES=c##user1.view1
impdp c##user1/oracle@pdb12 directory=ORA_DIR dumpfile=view1.dmp logfile=view1.imp.log tables=c##user1.view1
conn C##USER1/oracle@pdb12
select * from view1;