zoukankan      html  css  js  c++  java
  • oracle 新建数据库从dmp文件恢复数据

    --1.如果已经还原过,则清理数据和用户
    SQL> drop user lxyweb cascade;

    用户已删除。

    SQL> drop tablespace lxyweb;


    SQL> create user lxyweb identified by lxyweb default tablespace users temporary
    tablespace temp;

    用户已创建。

    SQL> grant connect,resource,dba to lxyweb;

    授权成功。

    SQL> create smallfile tablespace "LXYWEB" datafile 'D:\oracle\product\10.2.0\oradata\weboa\lxyweb1.dbf' size 100M
      autoextend on next 100m
      maxsize unlimited
      logging extent management local segment space management auto;

    表空间已创建。

    SQL> GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
        DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
        DBA,CONNECT,RESOURCE,CREATE SESSION TO lxyweb;

    授权成功。

    SQL>select * from V$tablespace;
    --2.还原数据库
    D:\oracle\product\10.2.0\db_1\bin>imp lxyweb/lxyweb@weboa full=y file=x:\mxh\lxy20120419.dmp

    -----------------举例

    --把下面汉字部分修改为正确的内容 

    drop user 用户名 cascade;
    drop tablespace 用户名;
    create user 用户名 identified by 密码 default tablespace users temporary
    tablespace temp;
    grant connect,resource,dba to 用户名;
    create smallfile tablespace "表空间名称" datafile 'D:\oracle\product\10.2.0\oradata\jwc\数据文件名.dbf' size 100M
      autoextend on next 100m
      maxsize unlimited
      logging extent management local segment space management auto;
    GRANT CREATE USER,DROP USER,ALTER USER ,CREATE ANY VIEW ,
        DROP ANY VIEW,EXP_FULL_DATABASE,IMP_FULL_DATABASE,
        DBA,CONNECT,RESOURCE,CREATE SESSION TO 用户名;
  • 相关阅读:
    jsTree展开根节点 设置用户图标
    Js图片缩放代码 鼠标滚轮放大缩小 图片向右旋转
    MySQL删除重复数据
    200道物理学难题——001 三只蜗牛
    慎用GetOpenFileName
    Windows7隐藏字体
    Windows 位图
    Windows 调色板
    C++模板特化
    使用Visual Studio制作安装包
  • 原文地址:https://www.cnblogs.com/kuailewangzi1212/p/2457298.html
Copyright © 2011-2022 走看看