测试,使用linux 系统,迁移至windos测试系统,迁移用户scott

1.源端导出(linux)

2.传输

3.目标端导入(windows)

1.源端导出,本次使用expdp

1)创建操作系统转储目录,存放expdp导出的dump文件

[oracle@enmo ~]$ cd /picclife/software/dump/

[oracle@enmo dump]$ ls -lrt /picclife/software/|grep dump
drwxr-xr-x 2 oracle oinstall 4096 Jan 12 09:02 dump

2)查询or创建数据库转储目录

SQL> select * from dba_directories;

SQL> create directory scott_dump as '/picclife/software/dump';

Directory created.

授予权限

SQL> grant read,write on directory scott_dump to scott;

Grant succeeded.

3)操作系统oracle用户使用迁移用户进行导出

expdp scott/tiger DIRECTORY=scott_dump dumpfile=scott_dump%U logfile=expdp_dump schemas=scott

2.文件传输

D:\tmp

scott_dump01.dmp

3.目标端导入windows系统

1)测试环境,删除用户

SQL> drop user scott cascade;

2)创建表空间

查询数据文件目录

SQL> select name from v$datafile;

根据源端scott用户,使用的表空间进行创建

SQL> create tablespace test datafile 'C:\WIN_ORACLE_11_DATABASE\APP\ORADATA\WIN11\test01.dbf' size 1m;

表空间已创建。

linux系统,查询迁移用户之前的表空间

SQL> select username,DEFAULT_TABLESPACE from dba_users where username='SCOTT';

USERNAME DEFAULT_TABLESPACE
-------------------- --------------------
SCOTT test

3)创建用户

*注意,迁移新环境的用户默认表空间需要与生产环境中的保持一致,本次查询上述是test

SQL> create user scott identified by tiger default tablespace test;

4)创建转储目录,并授予权限

SQL> create directory imp_scott as 'D:\tmp';

SQL>  grant read,write on directory imp_scott to scott;

5)权限同步

导入数据前,需要一些权限,因此在源端linux查询相应权限后,目标端windows进行同步

linux查询

select * from dba_role_privs where grantee='SCOTT'

GRANTEE GRANTED_ROLE ADMIN_ DEFAUL
-------------------- -------------------- ------ ------
SCOTT RESOURCE NO YES
SCOTT CONNECT NO YES

select * from dba_sys_privs where grantee='SCOTT'

GRANTEE PRIVILEGE ADMIN_
-------------------- -------------------- ------
SCOTT UNLIMITED TABLESPACE NO

*由于只是导入一个用户,因此无需同步其它用户的对象权限

windows授予

SQL> grant connect,resource to scott;

SQL> grant unlimited tablespace to scott;

5)进行导入

C:\Users\Thinkpad>impdp scott/tiger directory=imp_scott dumpfile=scott_dump%U logfile=scott_impdp

linux测试系统使用expdp迁移数据到windos系统,11.2.0.4版本测试的更多相关文章

  1. 11.2.0.4 RAC测试环境修改时区

    当前问题: 系统时区修改后,集群数据库各个日志发现显示的还是之前时区的时间. 依据Linux (RHEL)修改时区更改了系统的时区后,集群数据库的各个日志还是显示之前的时区时间. 查找MOS资料 Ho ...

  2. Alpha版本测试文档

    概述 本次测试主要是为了测试是否有导致崩溃的bug,验证是否符合软件基本需求. 测试环境 硬件测试:安卓系统手机,安卓平板. 测试人员 赖彦谕,金哉仁. 实际进度 2015/11/6 – 2015/1 ...

  3. D盾 v2.0.6.42 测试记录

    0x01 前言 之前发了一篇博客<Bypass D盾_IIS防火墙SQL注入防御(多姿势)>,D哥第一时间联系我,对问题进行修复.这段时间与D哥聊了挺多关于D盾这款产品的话题,实在是很佩服 ...

  4. oracle数据迁移之Exp和Expdp导出数据的性能对比与优化

    https://wangbinbin0326.github.io/2017/03/31/oracle%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB%E4%B9%8BExp%E ...

  5. Oracle使用expdp/impdp迁移数据

    Oracle使用expdp/impdp迁移数据 1.#以下步骤在开发库执行(expdp导出) 一.创建逻辑目录,该命令不会在操作系统创建真正的目录,最好以system等管理员创建. sqlplus / ...

  6. LoadRunner测试ajax框架,回放后系统中没有产生数据解决方法

    1.QTP11 下载地址:http://www.genilogix.com/downloads/unified-functional-testing/quicktest-professional-11 ...

  7. 【linux】gitlab 的安装以及数据迁移

    一 .安装; 1  下载相应版本rpm包并安装 https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/ wget https://mirrors ...

  8. 测试Oracle 11gr2 RAC 非归档模式下,offline drop数据文件后的数据库的停止与启动测试全过程

    测试Oracle 11gr2 RAC 非归档模式下,offline drop数据文件后的数据库的停止与启动测试全过程 最近系统出现问题,由于数据库产生的日志量太大无法开启归档模式,导致offline的 ...

  9. 吐血记录微信小程序授权获取Unionid及linux下使用bouncycastle解密用户数据 遇到的坑

    背景 公司小程序上线了,发现系统无法拿到一些用户的UniondID.但是上线前的测试一切都是正常的. 坑1 经排查,发现一些用户通过下面的接口无法得到unionid https://api.weixi ...

随机推荐

  1. [CodeForces - 614D] D - Skills

    D - Skills Lesha plays the recently published new version of the legendary game hacknet. In this ver ...

  2. [CodeForces - 614C] C - Peter and Snow Blower

    C - Peter and Snow Blower Peter got a new snow blower as a New Year present. Of course, Peter decide ...

  3. vue element-ui 通过v-for渲染的el-form-item组件,使用自带的表单验证

    HTML: <el-form ref="newTermDetail" :model="newTermDetail" class="auto_fo ...

  4. xmanager运行报错:bash: /usr/bin/xterm: No such file or directory

    1.原因 xterm没有安装,解决办法是下载然后安装即可. 如果机器可以用yum,则直接使用yum安装xterm即可: yum install -y xterm 如果没有网络,则在某台操作系统大版本相 ...

  5. 使用Spring-data-jpa(2)(三十一)

    创建实体 创建一个User实体,包含id(主键).name(姓名).age(年龄)属性,通过ORM框架其会被映射到数据库表中,由于配置了hibernate.hbm2ddl.auto,在应用启动的时候框 ...

  6. mac CodeIgniter和EasyWeChat 开发微信公众号

    mac 安装 Composer //composer安装成功 curl -sS https://getcomposer.org/installer | php //将composer.phar移动到 ...

  7. windows 网络操作

    ver 命令 显示当前机器上的操作系统版本信息 ipconfig/release 释放IP地址 ipconfig/renew 重新获取IP地址 cmd下使用ssh 如果想在cmd中输入 ssh xx@ ...

  8. Win10系列:UWP界面布局基础5

    (2)编写后台代码访问资源 下面通过一个例子来演示如何编写后台代码引用资源.新建一个Windows应用商店的空白应用程序项目,将其命名为AccessResourceApplication,打开项目下的 ...

  9. fzu1977

    题解: 和前两题差不多 只不过变成了有些一定走,有些不一定 代码: #include<cstdio> #include<cmath> #include<algorithm ...

  10. Iterator,迭代器模式,C++描述

    body, table{font-family: 微软雅黑; font-size: 13.5pt} table{border-collapse: collapse; border: solid gra ...