ORACLE database migration usual way

1: Review the need to migrate users and the corresponding database table space
select default_tablespace from dba_users where username = 'user login'

2: a key query table with partitions statements, see the need to transfer the corresponding user if the table is useful table partition
the SELECT TABLE_NAME, PARTITION_NAME, TABLESPACE_NAME
the FROM USER_TAB_PARTITIONS;
3: If you have a table partition table, the corresponding table space table partition also need to create, if not then down
4: create users and table spaces and data files in the database above migration
creates a database file
the create the Temporary tABLESPACE TORN_temp
tempfile 'D: \ oracledata \ TORN_temp.dbf'
size 50m
AUTOEXTEND oN
the Next MAXSIZE 20480m 50m
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 "TEMP_TORN" ACCOUNT UNLOCK;
GRANT UNLIMITED TABLESPACE TO TORN;
GRANT "CONNECT" TO TORN;
GRANT "DBA" TO TORN;

5: EXP, IMP export import statement migrate
EXP TORN / TORN FILE = C: \ TORN.DMP OWNER = TORN
IMP TORN / TORN @ ORCL FILE = C: \ TORN.DMP log = c: \ TORN TORN.log FROMUSER = TOUSER = TORN

Guess you like

Origin www.cnblogs.com/torn/p/11683709.html