zoukankan      html  css  js  c++  java
  • oracle表空间的创建及dmp 文件的导入

    用oracle系统权限的账号 登陆

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    -- 1.创建用户
    create user u_name identified by "u_password";
    --2.赋予权限
    grant dba, resource, connect to u_name;
    grant create session to u_name;
    grant create table to u_name;
    grant create view to u_name;
    grant create tablespace to u_name;
    grant unlimited tablespace to u_name;
    grant select any table to u_name;
    grant select any dictionary to u_name;
    --3.创建目录 dictionary
    create directory directory_name as 'D:oracleEnvOracleproduct11.2.0dbackup'; --路径可以自己指定
    --4.赋予目录权限
    GRANT read,write ON DIRECTORY directory_name TO u_name;
    --5.创建表空间
    create tablespace table_space_name
    datafile 'D:oracleEnvOracleproduct11.2.0dbhome_1oradata able_space_name.DBF'
    size 2500M
    autoextend on next 500M maxsize 12000M; 
    --6.修改表空间配置
    ALTER USER table_space_name DEFAULT TABLESPACE u_name;
    --8.查看表空间
    select tablespace_name , file_id,bytes from dba_data_files where tablespace_name='my_table_space_name';
    -- 9.导入数据
    -简单版 
    impdp u_name/u_password@ORCL dumpfile=file_path full=y table_exists_action=replace
    --常用版
    impdp u_name/u_password@ip_address/space_name directory=my_director full=y dumpfile=my_dmp_file.DMP logfile=my_dmp_file.log table_exists_action=replace;
    --高级版
    impdp u_name/u_password@ip_address/space_name directory=my_director full=y dumpfile=my_dmp_file.DMP logfile=my_dmp_file.log
    [remap_schema=user_1:user_2] [remap_tablespace =table_space_1:table_space_2] [table_exists_action=replace]
  • 相关阅读:
    linux查看存储盘
    aix中hd5对应什么设备?
    (转)Python 操作 Windows 粘贴板
    eclipse非主窗口的停靠(正常), 恢复, 最小化, 最大化的切换
    (转)HTML5 本地数据库(SQLite) 示例
    [译] 如何像 Python 高手一样编程?
    scrapy递归下载网站
    eclipse快捷键以及使用技巧大全
    python任意编码转utf8或者unicode
    apache快速配置简易网站
  • 原文地址:https://www.cnblogs.com/activiti/p/7575109.html
Copyright © 2011-2022 走看看