Oracle:Create tablespace and move table to another tablespace

CREATE TABLESPACE "IMAGEDATA"
    NOLOGGING
    DATAFILE 'D:/oracle/oradata/DATA01.dbf' SIZE 2000M,
    'D:/oracle/oradata/DATA02.dbf' SIZE 2000M,
    'D:/oracle/oradata/DATA03.dbf' SIZE 2000M,
    'D:/oracle/oradata/DATA04.dbf' SIZE 2000M,
    'D:/oracle/oradata/DATA05.dbf' SIZE 2000M EXTENT
    MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT  AUTO

----------------------------------------------------------------------------------------

SQL> select tablespace_name from dba_tablespaces;

TABLESPACE_NAME
------------------------------
SYSTEM
UNDOTBS1
TEMP
EXAMPLE
INDX
USERS
PERF

7 rows selected.

SQL> create table test(a number);

Table created.

SQL> select tablespace_name from tabs where table_name='TEST';

TABLESPACE_NAME
------------------------------
SYSTEM

SQL> alter table test move users;
alter table test move users
*
ERROR at line 1:
ORA-14133: ALTER TABLE MOVE cannot be combined with other operations


SQL> alter table test move tablespace users;

Table altered.

SQL> select tablespace_name from tabs where table_name='TEST';

TABLESPACE_NAME
------------------------------
USERS

SQL>
SQL> drop table test;

Table dropped.

SQL>

原文地址:https://www.cnblogs.com/tracy/p/2186470.html