--将数据库为testdb,用户名为testuser中默认(users)表空间里的数据迁移至表空间(newtablespace) --1.用system用户登陆testdb数

logo.jpg

首页 → 数据库技术

背景:

阅读新闻

Oracle不同表空间之间的数据迁移

[日期:2013-01-29]

来源:Linux社区

作者:Linux

[字体:]

--将数据库为testdb,用户名为testuser中默认(users)表空间里的数据迁移至表空间(newtablespace)

--1.用system用户登陆testdb数据库,创建directory(testdir)并将读、写权限授予testuser用户

create or replace directory testdir as 'e:\temp';

grant read, write on directory testdir to testuser;

--使用expdp命令导出testuser用户的数据

expdp system/aaaaaa@testdb directory=testdir dumpfile=testdb.dmp schemas=testuser;

--2.创建表空间newtablespace

create tablespace newtablespace

logging

datafile 'E:\Oracle\product\10.2.0\oradata\oa\newtablespace.dbf'

size 100m

autoextend on

next 200m maxsize 2048m

extent management local;

--3.将testuser的表空间修改为newtablespace

alter user testuser default tablespace newtablespace;

--4.将testuser用户下面的表、序列等删除

--5.导入数据

impdp system/aaaaaa@testdb directory=testdir dumpfile=testdb.dmp remap_tablespace=users:newtablespace

logo.gif

0

Oracle 中的sequence用法

CentOS上开启MySQL远程访问权限

相关资讯

Oracle表空间 Oracle数据迁移

图片资讯

本文评论

查看全部评论 (0)

评论声明

最新资讯

本周热门

Linux公社简介 - 广告服务 - 网站地图 - 帮助信息 - 联系我们

本站(LinuxIDC)所刊载文章不代表同意其说法或描述,,仅为提供更多信息,也不构成任何建议。

Copyright © 2006-2014 Linux公社 All rights reserved 浙ICP备06018118号 本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉 本文系统来源:php中文网

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐