oracle 创建.dmp文件,oracle表空间的创建及dmp文件的导入(推荐)

--用oracle系统权限的账号 登陆

-- 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:\oracleEnv\Oracle\product\11.2.0\db\backup'; --路径可以自己指定

--4.赋予目录权限

GRANT read,write ON DIRECTORY directory_name TO u_name;

--5.创建表空间

create tablespace table_space_name

datafile 'D:\oracleEnv\Oracle\product\11.2.0\dbhome_1\oradata\table_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]

总结

以上所述是小编给大家介绍的oracle表空间的创建及dmp 文件的导入,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持! ad51e517755f8fd6a7ec83ced4ecfaf3.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在 DBeaver 中导入 `.dmp` 文件Oracle 数据库,你可以按照以下步骤进行操作: 1. 打开 DBeaver 并连接到你的 Oracle 数据库。 2. 在导航面板中选择你要导入数据的目标数据库。 3. 右键点击目标数据库,选择 "Tools"(工具)-> "Database Tools"(数据库工具)-> "Import"(导入)。 4. 在弹出窗口中,选择 "Data Pump Import"(数据泵导入)作为导入类型。 5. 在 "Data Pump Import" 设置页面中,填写以下信息: - "Username"(用户名)和 "Password"(密码):输入你的 Oracle 数据库的用户名和密码。 - "Directory"(目录):选择一个已存在的目录,用于存放导入文件。 - "File"(文件):点击 "..." 按钮,选择你要导入的 `.dmp` 文件。 - "Schema"(模式):选择要导入数据的目标模式。 - 其他选项根据你的需求进行配置。 6. 点击 "Next"(下一步)继续设置导入参数。 7. 在 "Data Pump Import" 设置页面中,可以选择要导入的对象类型和具体对象。你可以选择导入所有对象或者只导入特定的对象类型(如表、索引、触发器等)。 8. 点击 "Next"(下一步)继续设置导入参数。 9. 在 "Data Pump Import" 设置页面中,可以进一步配置导入选项,如数据处理、约束处理、导入模式等。 10. 点击 "Next"(下一步)继续设置导入参数。 11. 在 "Data Pump Import" 设置页面中,可以查看并确认导入的设置。确认无误后,点击 "Finish"(完成)开始导入过程。 12. 导入过程会显示进度信息和导入结果。等待导入过程完成。 完成上述步骤后,你的 `.dmp` 文件中的数据将会被导入指定Oracle 数据库中。请确保你的数据库连接信息正确,并且你有足够的权限执行导入操作。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值