oracle匯入匯出
CREATE TABLESPACE META_RESULT_DATA DATAFILE '\data\META_RESULT_DATA.ora' SIZE 5G AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLESPACE DAMS_INDEX DATAFILE '/data/DAMS_INDEX.ora' SIZE 1G AUTOEXTEND ON NEXT 500M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLESPACE DAMS_DATA DATAFILE '/data/tablespace1.dbf' SIZE 25G AUTOEXTEND ON NEXT 500M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K;
CREATE TABLESPACE DAMS_DATA DATAFILE '/data/tablespace1.dbf' SIZE 20G AUTOEXTEND ON NEXT 500M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K;
impdp DAMS/[email protected]:1523/sjzcdb DIRECTORY=DATA_PUMP_DIR DUMPFILE=dams_biz_data_fs_20200402.dmp LOGFILE=dams_biz_data_fs1.log table_exists_action=REPLACE full=y ignore=y remap_schema=dams:dams remap_tablespace=A:B
/data/app/oracle/product/12.1.0/dbhome_1/network/admin/tnsnames.ora
ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xqzt)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
)
tnsping pdborcl
grant dba to dp identified by dp;
create or replace directory dp_dir as '/home/oracle';
grant read,write on directory dp_dir to dp;
echo $ORACLE_SID
select count(*) from scott.DEPT;
drop user scott cascade;
impdp dp/dp@pdborcl directory=dp_dir dumpfile=scott_pdborcl.dmp logfile=scott_pdborcl_imp.log schemas=scott
impdp DAMS/[email protected]:1521/ORCLPDB DIRECTORY=dp_dir DUMPFILE=DAMS_20200320.DMP LOGFILE=dams.log full=y ignore=y schemas=DAMS table_exists_action=REPLACE remap_schema=DAMS_DP:dams