-- no need to re-create controlfile
http://laurentschneider.blogspot.com/2006/01/change-maxdatafiles-malogfiles.html
This site contains information, scripts and instructions related to Oracle database and other technologies. Please use sqlplus and test my scripts on test environment before actual use on production. All relevant comments are welcome.
Страницы
- Main
- Veritas cluster
- AIX
- Solaris
- Linux
- Performance scripts
- RAC
- TNS
- Init parameters
- Dataguard
- ASM
- Unix tips
- VxVM
- Linux HA (hearbeat)
- Oracle internals
- Metalink (useful notes)
- Security
- OGG Oracle Golden Gate
- HTML/JavaScript in sqlplus
- Automatic TSPITR 11.2.0.3 (dropped user)
- 12.1
- SQL Performance Analyzer
- Backup/Recovery
- Alert log
пятница, 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
-- 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
Capacity: 10g Segment growth prediction
select * from
table(dbms_space.OBJECT_GROWTH_TREND
('TEST','TEST','TABLE'));
--
-- set serveroutput off;
-- if - EXCEPTION in chrow processing - code: -14551 msg: ORA-14551: cannot perform a
-- DML operation inside a query
--
table(dbms_space.OBJECT_GROWTH_TREND
('TEST','TEST','TABLE'));
--
-- set serveroutput off;
-- if - EXCEPTION in chrow processing - code: -14551 msg: ORA-14551: cannot perform a
-- DML operation inside a query
--
Подписаться на:
Сообщения (Atom)
Update BLOB
set define off DECLARE vb1 CLOB := 'long text'; vb2 CLOB := 'long text'; vb3 CLOB := ...
-
set define off DECLARE vb1 CLOB := 'long text'; vb2 CLOB := 'long text'; vb3 CLOB := ...
-
RMAN> sql "alter database datafile '/u01/app/oracle/oradata/orcl/test_1.dbf' off line"; using target database contro...
-
-- After media failure 03:03:25 150 4294967295 SYS@orcl> select * from t_t where object_name = 'test'; select * from t_t where ob...