以下の内容はhttps://htn20190109.hatenablog.com/entry/2025/01/21/004530より取得しました。


{15 その他}ビューを表としてエクスポート、インポート

 

https://docs.oracle.com/cd/F19136_01/sutil/oracle-data-pump-export-utility.html#GUID-E4E45E81-5391-43BE-B27D-B763EF79A885


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;


conn C##USER1/oracle@pdb11


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;

 




以上の内容はhttps://htn20190109.hatenablog.com/entry/2025/01/21/004530より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14