Oracle Transfer Table Space

Source: Internet
Author: User

First, system table Space Data Files Migration :
Sql> conn/@tmpdb as Sysdba connected.

sql> desc dba_data_files;

is the name empty? Type-----------------------------------------------------------------------------
file_name VARCHAR2 (513) file_id number tablespace_name VARCHAR2 (+) BYTES number BLOCKS number STATUS VARCHAR2 (9) RELATIVE _FNO number autoextensible VARCHAR2 (3) maxbytes number Maxblocks number increment_by number User_bytes number User_blocks Number Online_status VARCHAR2 (7)
Sql> Select File_name,tablespace_name from dba_data_files where tablespace_name= ' SYSTEM ';
file_name--------------------------------------------------------------------------------
Tablespace_name------------------------------D:\ORACLE\PRODUCT\10.2.0\ORADATA\STUDY\SYSTEM01. DBF SYSTEM
sql> shutdown Immediate

The database is closed.

The database has been uninstalled.

The ORACLE routine has been closed.

Sql> Host copy D:\oracle\product\10.2.0\oradata\study\system.dbf D:\oracle\study
The system cannot find the file specified.
Sql> host copy D:\oracle\product\10.2.0\oradata\study\system.dbf d:\oracle\study \ system cannot find the file specified.
Sql> host copy D:\oracle\product\10.2.0\oradata\study\SYSTEM01. DBF D:\oracle\stu dy\ has copied 1 files.
Sql> Startup Mount ORACLE routine has been started.
Total System Global area 1140850688 bytes Fixed size 2065184 bytes Variable Size 301993184 bytes

Database Buffers 822083584 bytes Redo buffers 14708736 bytes

The database is loaded.

Sql> ALTER DATABASE rename file ' D:\oracle\product\10.2.0\oradata\study\system01. dbf ' to ' D:\oracle\study\ SYSTEM01.DBF '; The
database has changed.
Sql> ALTER DATABASE open; The
database has changed.
Sql> Select File_name,tablespace_name from dba_data_files where tablespace_name= ' SYSTEM ';
file_name--------------------------------------------------------------------------------
Tablespace_ NAME------------------------------D:\ORACLE\STUDY\SYSTEM01. DBF SYSTEM
sql> Select File_name,tablespace_name from dba_data_files where tablespace_name= ' USERS ';
file_name--------------------------------------------------------------------------------
Tablespace_name-- ----------------------------D:\ORACLE\PRODUCT\10.2.0\ORADATA\STUDY\USERS01. DBF USERS

II, Non-system tablespace data file movement:

Sql> alter TABLESPACE users offline 2;
Table space has changed.
Sql> host copy D:\oracle\product\10.2.0\oradata\study\user01.dbf d:\oracle\study \ system cannot find the file specified.
Sql> host copy D:\oracle\product\10.2.0\oradata\study\users01.dbf D:\oracle\stud y\ has copied 1 files.
sql> alter tablespace users rename datafile ' D:\oracle\product\10.2.0\oradata\st udy\users01.dbf ' to ' d:\oracle\ STUDY\USERS01.DBF ';
Table space has changed.
sql> alter tablespace users online 2;
Table space has changed.
Sql> Select File_name,tablespace_name from dba_data_files where tablespace_name= ' USERS ';
file_name--------------------------------------------------------------------------------
Tablespace_name------------------------------D:\ORACLE\STUDY\USERS01. DBF USERS
Sql>

Oracle Transfer Table Space

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.