项目需求:从prod数据库迁移和复制2个表(BANK_STATE,HBS)的数据到uat数据库环境。
数据库版本:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
迁移工具:客户端exp/imp工具
-- 执行命令 从Prod数据库导出数据exp username/password@server_ip:1521/service_name TABLES=(BANK_STATE,HBS) file=C:\oracle\dump\cola_tables_20250324.dmp log=C:\oracle\dump\cola_tables_20250324_exp.log-- Login DB 进入sqlplussqlplus username/password@server_ip:1521/service_name-- 提前在UAT环境删掉已经存在的表DROP TABLE BANK_STATE;
DROP TABLE HBS;-- 执行命令 将dump文件导入到uat数据库imp username/password@server_ip:1521/service_name file=C:\oracle\dump\cola_tables_20250324.dmp log=C:\oracle\dump\cola_tables_20250325_imp.log tables=(BANK_STATE,HBS)
导出日志记录
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
server uses AL32UTF8 character set (possible charset conversion)About to export specified tables via Conventional Path ...
. . exporting table BANK_STATE 307313 rows exported
EXP-00091: Exporting questionable statistics.
. . exporting table HBS 1377128 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
Export terminated successfully with warnings.
导入日志记录
Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.22.0.0.0Export file created by EXPORT:V19.00.00 via conventional path
import done in US7ASCII character set and AL16UTF16 NCHAR character set
import server uses AL32UTF8 character set (possible charset conversion)
IMP-00403: Warning: This import generated a separate SQL file "C:\oracle\dump\cola_tables_20250325_imp_sys.sql" which contains DDL that failed due to a privilege issue.. importing COLADB's objects into COLADB
. importing COLADB's objects into COLADB
. . importing table "BANK_STATE" 307313 rows imported
. . importing table "HBS" 1377128 rows imported
Import terminated successfully with warnings.