expdp/impdp数据库迁移

举报
snowofsummer 发表于 2021/08/31 15:14:17 2021/08/31
【摘要】 1,系统环境准备,挂载nfsmount -V nfs -o rw,hard,noac,vers=3,timeo=600,rsize=32768,wsize=32768 10.250.250.1:/orabk /expchmod 777 /exp#alter system set events '10298 trace name context forever,level 32';2,导出数...

1,系统环境准备,挂载nfs

mount -V nfs -o rw,hard,noac,vers=3,timeo=600,rsize=32768,wsize=32768 10.250.250.1:/orabk /exp
chmod  777 /exp

#alter system set events '10298 trace name context forever,level 32';

2,导出数据库环境准备并导出数据库

#字符集查询

sqlplus / as sysdba
set linesize 1000;
select * from nls_database_parameters;

NLS_CHARACTERSET               ZHS16GBK
NLS_NCHAR_CHARACTERSET         AL16UTF16

#表空间查询

4    10452    USERS                ***     /scndbdata/UISS/users01.dbf
5    10240    USERS                ***     /scndbdata/UISS/users02.dbf

导出数据:

export ORACLE_SID=UISS1
sqlplus / as sysdba
create user its identified by its;
grant dba to its;
conn its/its
create or replace directory exp as '/exp/uiss'; 


#### 
export ORACLE_SID=UISS
####
expdp its/its schemas=XIAOSHOUHEXINQUANXIAN dumpfile=xx0831.dmp DIRECTORY=exp logfile=xx0831.log
expdp its/its schemas=AGENCY dumpfile=UISSAGENCY0831.dmp DIRECTORY=exp logfile=AGENCY0831.log
# 
expdp its/its schemas=SALES dumpfile=UISSSALES0831.dmp DIRECTORY=exp logfile=SALES0831.log


IMPDP:

###########

export ORACLE_SID=UISS1
impdp its/its schemas=XIAOSHOUHEXINQUANXIAN dumpfile=xx0831.dmp DIRECTORY=exp logfile=impxx0831.log
impdp its/its schemas=AGENCY dumpfile=UISSAGENCY0831.dmp DIRECTORY=exp logfile=impAGENCY0831.log
impdp its/its schemas=SALES dumpfile=UISSSALES0831.dmp DIRECTORY=exp logfile=impSALES0831.log


exp/imp

export ORACLE_SID=sales1
sqlplus / as sysdba
create user its identified by its;
grant dba to its;
conn its/its
create or replace directory exp as '/exp/sales';


 
####
export ORACLE_SID=sales
##
expdp its/its schemas=XIAOGUANQUANXIAN dumpfile=XIAOGUANQUANXIAN0831.dmp DIRECTORY=exp logfile=XIAOGUANQUANXIAN0831.log
#30G 
expdp its/its schemas=SALES dumpfile=SALES0831.dmp DIRECTORY=exp logfile=SALES0831.log
####
expdp its/its schemas=CCI_JH dumpfile=CCI_JH0831.dmp DIRECTORY=exp logfile=CC0831.log

$$$$$$$$$

export ORACLE_SID=sales1
impdp its/its schemas=XIAOGUANQUANXIAN dumpfile=XIAOGUANQUANXIAN0831.dmp DIRECTORY=exp logfile=impXIAOGUANQUANXIAN0831.log
####
impdp its/its schemas=CCI_JH dumpfile=CCI_JH0831.dmp DIRECTORY=exp logfile=impCC0831.log
#30G 
impdp its/its schemas=SALES dumpfile=SALES0831.dmp DIRECTORY=exp logfile=impSALES0831.log
【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。