-- Migrate data in the default (users) tablespace of the database testdb and testuser to the tablespace (newtablespace) -- 1. Use the system user to log on to testdb
-- Migrate data in the default (users) tablespace of the database testdb and testuser to the tablespace (newtablespace) -- 1. Use the system user to log on to testdb
Homepage → Database Technology
Background:
Read News
Data migration between different Oracle tablespaces
[Date:] Source: Linux community Author: Linux [Font:]
-- Migrate data in the default (users) tablespace of testdb and testuser to the tablespace (newtablespace)
-- 1. Use the system user to log on to the testdb database, create directory (testdir), and grant the read and write permissions to the testuser.
Create or replace directory testdir as 'e: \ temp ';
Grant read, write on directory testdir to testuser;
-- Use the expdp command to export data of the testuser
Expdp system/aaaaaa @ testdb directory = testdir dumpfile = testdb. dmp schemas = testuser;
-- 2. Create a tablespace newtablespace
Create tablespace newtablespace
Logging
Datafile 'e: \ Oracle \ product \ 10.2.0 \ oradata \ oa \ newtablespace. dbf'
Size 100 m
Autoextend on
Next 200 m maxsize 2048 m
Extent management local;
-- 3. Change the table space of testuser to newtablespace.
Alter user testuser default tablespace newtablespace;
-- 4. Delete tables and sequences under the testuser.
-- 5. Import Data
Impdp system/aaaaaa @ testdb directory = testdir dumpfile = testdb. dmp remap_tablespace = users: newtablespace
0
Sequence usage in Oracle
Enable MySQL remote access on CentOS
Oracle tablespace Oracle data migration
Image Information
View All comments in this article (0)
Comments
Latest Information
Popular this week
Introduction to Linux community-advertisement service-website map-help Info-contact us
The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.
Copyright©2006-2014 Linux community All rights reserved Zhejiang ICP backup No. 06018118