zoukankan      html  css  js  c++  java
  • 【Vegas原创】同一database里建测试tablespace

    起因:一个PC已经装了3个数据库,现开发人员要求再建一个测试数据库,想来想去,决定在开发数据库orcl中建立test表空间,test用户,导入测试用户his的数据文件。当测试完毕,drop掉test tablespace及datafile即可。

    操作:

    1, 导出his用户的数据:

    >exp his/his@orcl file='E:\orcldmp20100804.dmp' log='E:\orcldmp20100804imp.log' 

    2, 创建test表空间:

    SQL>create tablespace TEST 
    datafile 'D:\ORADATA\ORCL\TEST01.DBF' size 26000M 
    autoextend on next 50m 
    maxsize unlimited; 

    3, 建test用户:

    SQL>create user test identified by test default tablespace test temporary tablespace temp; 

    4, 赋予test用户权限:

    SQL>grant connect,resource,dba to test; 

    5, 导入his用户数据:

    >imp test/test@orcl  file='E:\orcldmp20100804.dmp' fromuser=his touser=test log='E:\orcldmp20100804imp.log'
    喜欢请赞赏一下啦^_^
  • 相关阅读:
    软工总结博客
    第四次个人博客
    第三次博客作业
    结对项目作业
    第二次博客作业
    个人博客作业_week14
    个人博客作业_week7
    结对编程_附加题_博客2
    结对编程1_四则运算器_博客1
    个人博客作业_week3
  • 原文地址:https://www.cnblogs.com/amadeuslee/p/3744139.html
Copyright © 2011-2022 走看看