datafile相关(add、rename、drop)


--case 1 add
14:25:04 FPYJ(150_9)@test> alter tablespace fpyj_data02 add datafile '/oradata02/test/test/fpuj_data011.dbf' size 10m autoextend on;

Tablespace altered.


--case 2 rename
14:26:51 SYS(150_11)@test> alter tablespace fpyj_data02 offline;

Tablespace altered.

[oracle@Oracle11g test]$ pwd
/oradata02/test/test

[oracle@Oracle11g test]$ cp fpuj_data011.dbf fpuj_data0111.dbf

14:28:28 SYS(150_11)@test> alter tablespace fpyj_data02 rename datafile '/oradata02/test/test/fpuj_data011.dbf' to '/oradata02/test/test/fpuj_data0111.dbf';

Tablespace altered.

Elapsed: 00:00:00.04
14:29:23 SYS(150_11)@test> alter tablespace fpyj_data02 online;

Tablespace altered.

--case 3 drop
14:29:47 SYS(150_11)@test> alter tablespace fpyj_data02 drop datafile '/oradata02/test/test/fpuj_data0111.dbf';

Tablespace altered.

posted @ 2017-06-23 14:46  Oracle-fans  阅读(433)  评论(0编辑  收藏  举报