标签:ext 数据文件 local ble 没有 cal ORC ogg HERE
1:查看需要迁移的数据库的用户及对应的表空间
select default_tablespace from dba_users where username=‘登录用户‘
2:一键查询有表分区的语句,看对应的需要转移的用户是否有用表分区的表
SELECT TABLE_NAME,PARTITION_NAME,TABLESPACE_NAME
FROM USER_TAB_PARTITIONS;
3:如果有表分区的表,则对应的表分区的表空间也需要创建,如果没有则往下
4:在迁移的数据库上面创建用户及表空间和数据文件
创建数据库文件
create temporary tablespace torn_temp
tempfile ‘D:\oracledata\torn_temp.dbf‘
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
create tablespace torn
logging
datafile ‘D:\oracledata\torn.dbf‘
size 50m
autoextend on
next 50m maxsize 20480m
extent management local;
创建用户及指定表空间
CREATE USER torn PROFILE "DEFAULT" IDENTIFIED BY "torn" DEFAULT TABLESPACE "TORN" TEMPORARY TABLESPACE "TORN_TEMP" ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO taxi;
GRANT "CONNECT" TO taxi;
GRANT "DBA" TO taxi;
5:通过EXP,IMP导出导入语句迁移
EXP torn/torn FILE=C:\torn.DMP OWNER=torn
IMP torn/torn@ORCL FILE=C:\torn.DMP log=c:\torn.log FROMUSER=torn TOUSER=torn
标签:ext 数据文件 local ble 没有 cal ORC ogg HERE
原文地址:https://www.cnblogs.com/torn/p/13304572.html