Home > Database > Mysql Tutorial > [Oracle]表空间之间的数据迁移记录

[Oracle]表空间之间的数据迁移记录

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:19:05
Original
939 people have browsed it

任务描述:将表空间wy的内容全部拷贝到表空间tietong中去。具体步骤:1.首先,本地安装Oracle。2.其次,通过Net Configuration A

任务描述:将表空间wy的内容全部拷贝到表空间tietong中去。

具体步骤:
1.首先,本地安装Oracle。

2.其次,通过Net Configuration Assistant,建立到位于10.153.246.149的数据库CMSTEST的本地Net服务,,用户名和密码是wy/123456,本地Net服务名是wy。

3.进入dos窗口,使用命令exp wy/123456@wy file=c:\wy.dmp owner=(wy) 来导出数据。

4.采取以下措施创建表空间及用户:
4.1:通过Telnet连接到数据库所在机器
>telnet 10.153.246.149
之后输入用户名root,密码root
4.2:通过su命令切换到Oracle用户
>su – oracle
4.3:启动SqlPlus
>sqlplus
之后输入用户名cms_test,密码password123
4.4:输入以下SQL语句创建表空间及用户
4.4.1   创建表空间CREATE TABLESPACE tietong DATAFILE 'tietong2.dbf' SIZE 1000m;(若需空间请改变size,若tietong已经建立好可用 drop tablesapce tietong 删除它)
4.4.2   创建用户 CREATE user tietong identified by "123"  default tablespace tietong

temporary tablespace TEMP profile DEFAULT;
4.4.3   更改密码 alter user tietong identified by "123456";
4.4.4   给用户加上DBA权限 grant dba to tietong with admin option;
4.4.5   最后输入Exit退出sqlplus环境。


5.接下来,通过Net Configuration Assistant,建立到位于10.153.246.149的数据库CMSTEST的本地Net服务,用户名和密码是tietong/123456,本地Net服务名是teitong(此名本该是tietong,但敲的时候笔误了,后来也懒得改)。

6.进入dos窗口,使用命令imp tietong/123456@teitong  file=c:\wy.dmp  ignore=y full=y来导入

数据,虽然有报错,但没有影响数据正常导出

7.进入表空间tietong检查,初验表,数据,存储过程,索引,序列都完好,具体待进一步测试。

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template