пятница, 21 января 2011 г.

Capacity: 10g: drop datafile

--
-- Drop empty datafile (not one only one and not first in tablespace)
--
alter tablespace ft add datafile 'C:\PROJECT\OCP\FT.DBF1' size 1m;
Tablespace altered.
alter tablespace ft drop datafile 'C:\PROJECT\OCP\FT.DBF1';
Tablespace altered
--
-- but if datafile not empty
--
alter database datafile 'C:\PROJECT\OCP\FT.DBF1' resize 10m;
Database altered.
alter table test.t_all allocate extent (size 1k datafile 'C:\PROJECT\OCP\FT.DBF1');
Table altered.
--
alter tablespace ft drop datafile 'C:\PROJECT\OCP\FT.DBF1';
alter tablespace ft drop datafile 'C:\PROJECT\OCP\FT.DBF1'
*
ERROR at line 1:
ORA-03262: the file is non-empty
--
-- and for first file
--
alter tablespace ft drop datafile 'C:\PROJECT\OCP\FT.DBF';
alter tablespace ft drop datafile 'C:\PROJECT\OCP\FT.DBF'
*
ERROR at line 1:
ORA-03263: cannot drop the first file of tablespace FT

Комментариев нет:

Отправить комментарий

Update BLOB

set define off DECLARE    vb1 CLOB := 'long text';    vb2 CLOB :=                 'long text';    vb3 CLOB :=              ...