温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

学习数据迁移之imp

发布时间:2020-07-21 01:12:14 来源:网络 阅读:221 作者:biltmore 栏目:关系型数据库


查询数据库语言及字符集

select userenv('language') from dual;

select * from nls_database_parameters #服务器

select * from nls_instance_parameters #客户端

select * from nls_session_parameters #会话

查看dump文件导出信息

strings bak20190315.dmp |head -10

strings bak20190315.dmp | grep "CREATE TABLE" | awk '{print $3}'| sed 's/"//g'   #表

cat exp.dmp |od -x|head -1|awk '{print $2 $3}'|cut -c 3-6 #查看字符集代码

select nls_charset_name(to_number('0354','xxxx')) from dual; #代码转换成名称


create user note identified by luoluo; #建用户授权

grant connect,resource to note;

select name from v$datafile; #查询数据文件路径

create tablespace note datafile='/u01/app/oracle/oradata/orcl/note01.dbf' size 31G;  #新建表空间

alter tablespace note add datafile='/u01/app/oracle/oradata/orcl/note02.dbf' size 31G;

alter tablespace note add datafile='/u01/app/oracle/oradata/orcl/note03.dbf' size 31G;

alter tablespace note add datafile='/u01/app/oracle/oradata/orcl/note04.dbf' size 31G;

alter user note default tabspace note; #修改用户默认表空间

imp system/ORACLE12C  file=/mnt/data/bak20190315.dmp FROMUSER=NOTE



参考链接

https://www.cnblogs.com/lipera/p/6201434.html

https://www.cnblogs.com/lhrbest/p/6832707.html

https://www.cnblogs.com/rootq/articles/2049324.html

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI