exp por_admin@orawapd2 tables=tbl_oper_prog_his,tbl_detalle_camp_his,tbl_apo_op_ his file=3tablapor_admin.

dmp buffer=30000000 expdp por_admin tables=tbl_oper_prog_his,tbl_detalle_camp_his,tbl_apo_op_his dir ectory=expdp dumpfile=3tablaspor_admin.dmp logfile=3tablas.log en oraw como system ----------------------1.- agregar en el tnsnames.ora la instancia ora10 ORA10= (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=10.1.1.189) (PORT=1521) ) (CONNECT_DATA= (INSTANCE_NAME=ora10) (SERVICE_NAME=ora10) ) ) 2.- crea dblink ----------------------CREATE PUBLIC DATABASE LINK linkora10int CONNECT TO int_admin IDENTIFIED BY int_admin USING 'oralab'; drop public synonym tbl_oper_prog_his; create public synonym tbl_oper_prog_his for int_admin.tbl_oper_prog_his@linkora1 0int; drop public synonym tbl_detalle_camp_his; create public synonym tbl_detalle_camp_his for int_admin.tbl_detalle_camp_his@li nkora10int; drop public synonym tbl_apo_op_his; create public synonym tbl_apo_op_his for int_admin.tbl_apo_op_his@linkora10int; 3.- export de las 3 tablas base de datos ora10 --------------------4.- creacion de esquema create tablespace tspc_INT_DAT_S datafile '/u05/ora10/tspc_int_dat_s01.dat' size 14g; create tablespace tspc_INT_IDX_S datafile '/u05/ora10/tspc_int_idx_s01.dat' size 28g; -------create role R_INT_ACT; -------create role R_INT_CON; CREATE USER INT_aDMIN PROFILE DEFAULT IDENTIFIED BY INT_ADMIN

5.delete.insert..tbl_oper_prog_his as select * from tbl_oper_prog_his@link oraw. ---grant select. ---grant R_INT_CON to INT_CON.insert.import en ora10 impdp int_admin@oralab REMAP_SCHEMA=por_admin:int_admin REMAP_TABLESPACE=tspc_p or_dat_s:tspc_int_dat_s REMAP_TABLESPACE=tspc_por_idx_s:tspc_int_idx_s parallel= 4 directory=expdp dumpfile=3TABLASPOR_ADMIN. ---grant ENDUSR to INT_CON. ---grant ENDUSR to INT_EXP.REALIZAR GRANT EN ORA10 ---grant select on tbl_oper_prog_his to r_int_con.log tables=tbl_o per_prog_his. alter user INT_ADMIN quota unlimited on TSPC_INT_DAT_S quota unlimited on TSPC_INT_IDX_S.update on tbl_apo_op_his to r_int_act. ---grant select on tbl_apo_op_his to r_int_con. grant APPUSR to INT_ADMIN. . 6. -------------------------------------------------------------------------------------------create table int_admin. ---grant select..tbl_apo_op_his create table tbl_apo_op_his@linkora10int parallel(4) as select * from tbl_apo_op.tbl_apo_op_his as select * from tbl_apo_op_his@linkoraw. ----------------CREATE USER INT_CON PROFILE DEFAULT IDENTIFIED BY INT_CON DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK.log impdp int_admin@oralab REMAP_SCHEMA=por_admin:int_admin REMAP_TABLESPACE=tspc_p or_dat_s:tspc_int_dat_s REMAP_TABLESPACE=tspc_por_idx_s:tspc_int_idx_s parallel= 4 directory=expdp dumpfile=3TABLASPOR_ADMIN. ---grant select.update on tbl_oper_prog_his to r_int_act.tbl_detalle_camp_his as select * from tbl_detalle_camp_hi s@linkoraw.insert.DMP logfile=3tablas. ---grant R_INT_ACT to INT_EXP. ---grant select on tbl_detalle_camp_his to r_int_con.delete. create table int_admin.update on tbl_detalle_camp_his to r_int_act.DEFAULT TABLESPACE TSPC_INT_DAT_S TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK. CREATE USER INT_EXP PROFILE DEFAULT IDENTIFIED BY INT_EXP DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK.DMP logfile=3tablas.delete. create table int_admin.

-----grant select on tbl_oper_prog_his to PUBLIC. create public synonym tbl_detalle_camp_his for int_admin.tbl_detalle_camp_his.EN LA BD ORA10 drop public synonym tbl_oper_prog_his. 7.. drop public synonym tbl_detalle_camp_his. create public synonym tbl_oper_prog_his for int_admin. .tbl_oper_prog_his. grant select on tbl_apo_op_his to PUBLIC. grant select on tbl_detalle_camp_his to PUBLIC.

Sign up to vote on this title
UsefulNot useful