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表空间里面。

  • 相关阅读:
    lcn 分布式事务协调者集群原理
    springboot 监控 Actuator
    springboot 配置文件说明
    docker 安装jenkins
    docker 搭建maven 私服
    docker 安装 gitlab
    docker 安装软件
    docker 部署 java 项目
    mybatis 中between and用法
    vue-router history 模式 iis 配置
  • 原文地址:https://www.cnblogs.com/oktell/p/4601689.html
Copyright © 2011-2022 走看看