zoukankan      html  css  js  c++  java
  • IMP数据到指定的表空间

    IMP数据到指定的表空间

    当我们通过imp导入dmp文件时,默认的情况下,数据会导入到exp出的dmp文件所对应的表空间里面。

    比如:通过orcl_dev用户,exp数据,用orcl_test用户imp数据,这时数据还会默认导入到原来的表空间里。

    现有表空间dev,用户orcl_dev,导出数据。

    新建表空间test

    CREATE TABLESPACE test

     DATAFILE 'D:oracledata est.dbf' SIZE 50M AUTOEXTEND ON NEXT 1024M MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL AUTOALLOCATE BLOCKSIZE 8K SEGMENT SPACE MANAGEMENT AUTO FLASHBACK OFF;

    新建用户orcl_test,

    Create the user 

    create user orcl_test

      identified by "orcl_test"

    --指定用户默认的表空间为test

      default tablespace test;

    -- Grant/Revoke role privileges 

    grant connect to orcl_test;

    grant resource to orcl_test;

    -- Grant/Revoke system privileges 

    grant create database link to orcl_test;

    grant create view to orcl_test;

    grant debug any procedure to orcl_test;

    grant debug connect session to orcl_test;

    --先撤销此用户对表空间的unlimited权限

    revoke unlimited tablespace from orcl_test;

    --再赋予此用户当前表空间的权限。

    alter user orcl_test quota unlimited on orcl_test;

    再次imp orcl_test/orcl_test 数据已经导入到了test表空间里面。

  • 相关阅读:
    hping3 DDOS泛洪攻击
    如何利用kali破解密码
    python 字典数据类型day05
    Cisco Packet Tracer思科模拟器汉化本
    菜鸟入坑pythonday04列表
    python菜鸟入坑day02
    python运行的第一个脚本菜鸟篇
    python整个安装过程+环境变量
    菜鸟入坑python第一节
    01、python基础知识
  • 原文地址:https://www.cnblogs.com/oktell/p/4601689.html
Copyright © 2011-2022 走看看